I have a subfunction where I want to store a couple of strings. What I have done is after I have done my function setup is to have a jmp statement so it will skip over my strings, and before that label I have my strings in there. Down below is an "example" of what I am talking about.
JMP @@START
@@ERR1 DB 'GENERIC ERROR MESSAGE$'
@@ERR2 DB 'YET ANOTHER GENERIC MESSAGE$'
@@START:
; other code follows
Yet when I do these commands:
PUSH DS
PUSH CS
POP DS
MOV AX, 9
LEA DX, @@ERR1
INT 21H
LEA DX, @@CRLF
INT 21H
MOV AX, 0
POP DS
JMP @@FINISH
The only problem is when I try to print one of these strings the program crashes. I see no reason for this to be happening. Anyone have a bit of advice?
JMP @@START
@@ERR1 DB 'GENERIC ERROR MESSAGE$'
@@ERR2 DB 'YET ANOTHER GENERIC MESSAGE$'
@@START:
; other code follows
Yet when I do these commands:
PUSH DS
PUSH CS
POP DS
MOV AX, 9
LEA DX, @@ERR1
INT 21H
LEA DX, @@CRLF
INT 21H
MOV AX, 0
POP DS
JMP @@FINISH
The only problem is when I try to print one of these strings the program crashes. I see no reason for this to be happening. Anyone have a bit of advice?