You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
The following code always generates a Windows "...has peformed illegal function..."
error. It has been through MANY permutations, to no avail:
Code:
DEFSTR S
DEFWRD W
DEFINT I
S = " "
WSeg1 = CODESEG(Table1)
WPtr1 = CODEPTR(Table1)
WSeg2 = STRSEG(S)
WPtr2 = STRPTR(S)
! db &H66
! db &H60
! mov ds, WSeg1
! mov si, WPtr1
! mov es, WSeg2
! mov di, WPtr2
! mov al, ds:[si]
! mov es:[di], al
! db &H66
! db &H61
PRINT S
END(0)
Table1:
! db 084
I have tried replacing the Table1: with a second string that had
a letter in it. No luck. I have tried using CODEPTR32() and STRPTR32()
with ! lds and ! les, same results. I tried using ! movsb, with
no luck. So, I am forced to the conclusion that the error is being
generated by the program's trying to write to illegal memory.
Strangely enough, I have not had this problem with using ! mov
where its destination operand was a numeric variable - it only seems
to happen when it's a string variable.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: