This program converts binary to decimal and I'm supposed to push "$$" into a stack, so that later it would recognize "$$" and end the program. However, it gives me an error that "$$" is an invalid parameter for PUSH.
Everything else works for this program, I just need to somehow mark the end in the stack without an error. I have tried putting in numbers such as "00" and it creates an infinite loop instead of an error. I'm using emu8086, if that's the case.
PUSH ax
PUSH cx
PUSH dx
MOV cx, 10
PUSH "$$" ; pushes $$ to mark the end
Divide:
MOV dx, 0
DIV cx
PUSH dx
CMP ax, 0
JA Divide
MOV ah, 2
Print:
POP dx
CMP dx, "$$" ; compares if there's a mark, to end the program
JE End
ADD dl, '0'
INT 21h
JMP Print