flat assembler
Message board for the users of flat assembler.
Index
> DOS > Absolute Beginner: Help!!! |
Author |
|
Matrix 17 Nov 2005, 22:19
siryuhan,
you see there is a little problem with this, when you do call, the caller address is pushed onto the stack, so, when you pop dx, you get the return address back in dx, that is not what you wanted. mhm, btw you dont have to add 2 to address , unless you want to skip first 2 bytes Code: org 100h mov ax,3 ; set video mode (needed under win xp) int 10h push myInputMessage call print xor ah,ah ; wait keypress (needed under xp to see text) int 16h int 20h print: pop ax ; save return address pop dx ; get parameter push ax ; save return address mov ah, 9 int 21h ret myInputMessage: db "hello","$" this works |
|||
17 Nov 2005, 22:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.