I loaded this code off of the disk at 0x1000:0x0000
Here is the memory address of "wtf" being pushed onto the stack in segment 0x1000, then returning to segment 0:
(i pop it in segment 0, then print the value on screen)
Code: Select all
mov ax, wtf
push ax
push ds
mov ax, 0
push ax
mov ax, word [ds:0x1000]
push ax
retf ;going back to segment 0
wtf db 'hi', 0
Code: Select all
mov ax, 0x1000
mov ds, ax
mov ah, 0x0e
mov al, byte [ds:0x004e]
int 0x10