Page 2 of 2
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Tue May 03, 2011 3:37 am
by Love4Boobies
Hobbes wrote:Last note: "call far es:ax" is illegal. Make it "call far [es:bx]".
Perhaps you believe assembly is standardized...
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Wed May 04, 2011 1:47 am
by qw
Love4Boobies wrote:Perhaps you believe assembly is standardized...
Okay, please point me "call far es:ax" in the Intel manuals.
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Wed May 04, 2011 2:40 am
by Owen
Please point me to an assembler which implements pure Intel syntax (and not some modified version of it). Besides Intel's defunct asm386, good luck.
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Wed May 04, 2011 3:21 am
by qw
Owen, this is not about syntax. There is no such instruction as "call far es:ax" no matter what syntax.
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Wed May 04, 2011 9:12 pm
by Brendan
Hi,
Hobbes wrote:Owen, this is not about syntax. There is no such instruction as "call far es:ax" no matter what syntax.
That looks like it was meant to be "call far [es:ax]" (NASM syntax). I'm not sure how that'd look in AT&T syntax (maybe "es: lcall (%ax)"); or how it'd look in MASM, TASM, etc.
Cheers,
Brendan
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Wed May 04, 2011 10:31 pm
by rdos
Hobbes wrote:Owen, this is not about syntax. There is no such instruction as "call far es:ax" no matter what syntax.
Right. AX cannot be used for addressing. Perhaps it was meant to be EAX and "call far es:eax" which is valid?
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Thu May 05, 2011 1:34 am
by turdus
I see you have figured it out. It was meant to be "push current segment+ip and transfer control to code at segment:offset". And yes, accumulator cannot be used here, it was a bad habit of mine (using accumulator all the time). Change it to another register and you'll be fine.
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Thu May 05, 2011 7:03 am
by Owen
Hobbes wrote:Owen, this is not about syntax. There is no such instruction as "call far es:ax" no matter what syntax.
Really? Are you sure there is no assembler out there which takes "call far es:ax" as an operand? And are you sure you know what square brackets mean in all "Intel syntax" assemblers?
Re: How to access BIOS Interrupt without using "INT" instuct
Posted: Thu May 05, 2011 10:50 am
by Combuster
Are you sure there is no assembler out there which takes "call far es:ax" as an operand?
a) it is true intel syntax as per the manuals and as386
b) it is masm compatible
c) it is tasm compatible
d) is it fasm-compatible
e) is it nasm/yasm-compatible
f) is it att syntax
I'm going for g) none of the above. Which makes your point moot, really.
All offtopicness together, I think this "right syntax" thing is just over the top. All sane assemblers use [ ] when there is an explicit variable memory operand in effect, and nobody will become better if you have to introduce a new assembly language for the sake of just winning a debate over syntax correctness.
Now can we at least pretend to be friendly and go back to assuming nasm unless specified otherwise. Most OP's won't appreciate it if someone points out an error and the next one comes by and says that it actually works differently according to some StoopidASM.
Something reminds me about language wars and forum rules. Therefore, lock requested.