NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: nobody on October 30, 2007, 03:01:32 PM

Title: JMP with segmented memory
Post by: nobody on October 30, 2007, 03:01:32 PM
If I use 'jmp 3000h:53', the code does what I want, but I need to load that 53 from ax, and you can't just put 'jmp 3000h:ax' since it gives me errors. What is the proper way to jmp?
Title: Re: JMP with segmented memory
Post by: sancho1980 on October 30, 2007, 05:02:48 PM
if you know that your value is going to be 53 theres no point in loading it from ax, really :)
i take it that 53 was just an example for an address in ax, and in that case, you would have to store the value of ax in some variable like jump_to_me and then you can do something like "jmp jump_to_me"
Title: Re: JMP with segmented memory
Post by: nobody on October 30, 2007, 05:41:25 PM
push 3000h
push ax
retf

Used to be the "usual way" to do it... back in the Dark Ages when people used segmented memory... :)

Best,
Frank
Title: Re: JMP with segmented memory
Post by: nobody on October 30, 2007, 06:28:37 PM
Thanks, just what I was looking for.