JavaDude32
Programmer
Okay, what I wish to do is pass some parameters to a procedure of mine, but I'm getting an invalid operation error at runtime, the code I have is:
;...
.MODEL SMALL
.STACK 64
.DATA
CURPOS DW 0928H
LPOS2 DW 1030H
LPOS3 DW 1134H
LINE1 DB 'BLAH.',0DH,0AH,'$'
LINE2 DB 'BLAH BLAH',0DH,0AH,'$'
LINE3 DB 'BLAH BLAH BLAH',0DH,0AH,'$'
BLUE DB 17
;-----------------------------------------------------
.CODE
MAIN PROC FAR
MOV AX,@data
MOV DS,AX
MOV ES,AX
MOV DH,BYTE PTR BLUE
PUSH DX
CALL CLRSCR
MOV AX,4C00H
INT 21H
MAIN ENDP
MAKEPOS PROC NEAR
POP DX
MOV AX,0200H
MOV BH,00H
INT 10H
RET
MAKEPOS ENDP
PRTLINE PROC
POP DX
MOV AX,0900H
INT 21H
RET
PRTLINE ENDP
CLRSCR PROC
POP BX
MOV AX,0600H
MOV CX,0000H
MOV DX,184FH
INT 10H
RET
CLRSCR ENDP
END MAIN
I think I have it narrowed down to the popping the stack value into the BX register, but I don't know why this is causing an error. Any help would be very much appreciated, thanks.
Sincerely,
JavaDude32
;...
.MODEL SMALL
.STACK 64
.DATA
CURPOS DW 0928H
LPOS2 DW 1030H
LPOS3 DW 1134H
LINE1 DB 'BLAH.',0DH,0AH,'$'
LINE2 DB 'BLAH BLAH',0DH,0AH,'$'
LINE3 DB 'BLAH BLAH BLAH',0DH,0AH,'$'
BLUE DB 17
;-----------------------------------------------------
.CODE
MAIN PROC FAR
MOV AX,@data
MOV DS,AX
MOV ES,AX
MOV DH,BYTE PTR BLUE
PUSH DX
CALL CLRSCR
MOV AX,4C00H
INT 21H
MAIN ENDP
MAKEPOS PROC NEAR
POP DX
MOV AX,0200H
MOV BH,00H
INT 10H
RET
MAKEPOS ENDP
PRTLINE PROC
POP DX
MOV AX,0900H
INT 21H
RET
PRTLINE ENDP
CLRSCR PROC
POP BX
MOV AX,0600H
MOV CX,0000H
MOV DX,184FH
INT 10H
RET
CLRSCR ENDP
END MAIN
I think I have it narrowed down to the popping the stack value into the BX register, but I don't know why this is causing an error. Any help would be very much appreciated, thanks.
Sincerely,
JavaDude32