I'm using a flat assembler on windows and have already simulated a call instruction with jmp but was wondering if there's a better way to do it with less code?(not using a call)
here's the code.
org 100h
mov al, 'x'
push come_back ; - simulated "call" -
jmp test_label ; - continued -
come_back: ; - end of simulated "call" -
mov al, 'y'
push come_back2 ; - simulated "call" -
jmp test_label ; - continued -
come_back2: ; - end of simulated "call" -
Looop:
jmp Looop
test_label:
mov ah, 0x0e
int 0x10
pop cx ; - simulated "ret" -
jmp cx ; - end of simulated "ret"
This code just display's "xy", two char's to the console.
I don't want to use a call because i wan't a better understanding, and sometimes that involves doing things the wrong way. I'm new to assembly and didn't know what would be the best way to go about this.