How to access BIOS Interrupt without using "INT" instuction

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: How to access BIOS Interrupt without using "INT" instuct

Post by Love4Boobies »

Hobbes wrote:Last note: "call far es:ax" is illegal. Make it "call far [es:bx]".
Perhaps you believe assembly is standardized...
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: How to access BIOS Interrupt without using "INT" instuct

Post by qw »

Love4Boobies wrote:Perhaps you believe assembly is standardized...
Okay, please point me "call far es:ax" in the Intel manuals.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: How to access BIOS Interrupt without using "INT" instuct

Post 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.
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: How to access BIOS Interrupt without using "INT" instuct

Post by qw »

Owen, this is not about syntax. There is no such instruction as "call far es:ax" no matter what syntax.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: How to access BIOS Interrupt without using "INT" instuct

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
rdos
Member
Member
Posts: 3310
Joined: Wed Oct 01, 2008 1:55 pm

Re: How to access BIOS Interrupt without using "INT" instuct

Post 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?
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: How to access BIOS Interrupt without using "INT" instuct

Post 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.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: How to access BIOS Interrupt without using "INT" instuct

Post 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?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How to access BIOS Interrupt without using "INT" instuct

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Locked