assembly - How to far jump to $0x9000:%ax using AT&T syntax? -


i'm writing toy os learn workings of it, here came little problem. want long jump, follows:

ljmp $0x9000, *(%ax) 

the section address 0x9000, offset address stored in register ax (currently i'm still under real mode), i've tried following, none of them worked.

ljmp $0x9000, ax ljmp $0x9000, %ax ljmp $0x9000, (%ax) ljmp $0x9000, *(%ax) 

so how trick? i'm using gnu (i686-elf-as).

as alternative "nrz"'s method may push 0x9000 , ax , perform retf:

pushw $0x9000 push %ax retf 

note: on original 8086s , 8088s "pushw $xxxx" instruction not exist...


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -