Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Standard" BIOS interrupts

33 views
Skip to first unread message

Darren Gansberg

unread,
Nov 27, 2009, 12:42:54 PM11/27/09
to

Hi I am hobbyist and this is my first "post" to a newsgroup of this
nature so I apologise in advance if i fail to observe etablished
conventions.

I am interested in writing programs in x86 assembly (I'm using NASM)
running in 16 bit real mode (ultimately a bootloader like program) that
will target the Intel 386 and upwards as it seems is is the lowest
common denominator in Intel x86 line of processors.

I thought my best starting point would be to write a simple "hello
world" like program. That is a program that printed text to the screen
so that i had a means of tracking what was going on. Which of course
leads me to relying upon interrupts to access bios services.

Whilst I am aware of RBIL, just looking through the list(s) it appears
that the list identifies interrupts as they apply to only some bioses
and hardware as well as possibly some common base that would be
available in "all" bioses. As a result I am finding it somewhat
difficult to ascertain from the list what could be regarded as "standard
calls" (apologies if the terminology isnt correct).

I was wondering if someone could possibly point me in the right
direction to working out the common base that would be available to say
like a bootloader program that would function correctly all the time?

Thanks
Darren

David

unread,
Nov 27, 2009, 4:51:25 PM11/27/09
to

I think your focus is too scattered. You did mention your main
objective: boot loader with display output. For that you need the
following interrupts:

10 - display
16 - keyboard?
13 - disk

Numbers are in hex.


On 27 Nov 2009 17:42:54 GMT, Darren Gansberg
<dar...@MUNGED.microcosmotalk.com> wrote:

>
>Hi I am hobbyist and this is my first "post" to a newsgroup of this=20
>nature so I apologise in advance if i fail to observe etablished=20
>conventions.
>
>I am interested in writing programs in x86 assembly (I'm using NASM)=20
>running in 16 bit real mode (ultimately a bootloader like program) that=20
>will target the Intel 386 and upwards as it seems is is the lowest=20


>common denominator in Intel x86 line of processors.
>

>I thought my best starting point would be to write a simple "hello=20
>world" like program. That is a program that printed text to the screen=20
>so that i had a means of tracking what was going on. Which of course=20


>leads me to relying upon interrupts to access bios services.
>

>Whilst I am aware of RBIL, just looking through the list(s) it appears=20
>that the list identifies interrupts as they apply to only some bioses=20
>and hardware as well as possibly some common base that would be=20
>available in "all" bioses. As a result I am finding it somewhat=20
>difficult to ascertain from the list what could be regarded as "standard=
=20


>calls" (apologies if the terminology isnt correct).
>

>I was wondering if someone could possibly point me in the right=20
>direction to working out the common base that would be available to say=20

s_dub...@munged.microcosmotalk.com

unread,
Nov 27, 2009, 4:53:11 PM11/27/09
to

On Nov 27, 11:42=A0am, Darren Gansberg

<darm...@MUNGED.microcosmotalk.com> wrote:
> Hi I am hobbyist and this is my first "post" to a newsgroup of this
> nature so I apologise in advance if i fail to observe etablished
> conventions.
>
> I am interested in writing programs in x86 assembly (I'm using NASM)
> running in 16 bit real mode (ultimately a bootloader like program) that
> will target the Intel 386 and upwards as it seems is is the lowest
> common denominator in Intel x86 line of processors.
>
> I thought my best starting point would be to write a simple "hello
> world" like program. That is a program that printed text to the screen
> so that i had a means of tracking what was going on. Which of course
> leads me to relying upon interrupts to access bios services.
>
Yes, this is the simplist and still effective means of debugging a
program.

> Whilst I am aware of RBIL, just looking through the list(s) it appears
> that the list identifies interrupts as they apply to only some bioses
> and hardware as well as possibly some common base that would be

> available in "all" bioses. =A0As a result I am finding it somewhat


> difficult to ascertain from the list what could be regarded as "standard
> calls" (apologies if the terminology isnt correct).
>
> I was wondering if someone could possibly point me in the right
> direction to working out the common base that would be available to say
> like a bootloader program that would function correctly all the time?
>

If you can obtain one of the Dos Programmer's Reference editions, they
likely have a reference list of the Bios Interrupt Functions as a
subset of the RBIL.

Briefly..
Int 10h - video
Int 16h - keyboard
Int 19h - reboot
Int 13h - diskette

You add to these as your need arises.

Of course, msdos uses Int 21h, which are not present when a bootloader
receives control.

I'd be hard pressed to say what the 'standard' is. I guess the AT
class for pre Plug-n-Play Bioses of which only IBM ever published
their bios code.

If you go to the website of your RomBIOS provider, they likely still
have a document covering _their_ support of RomBios Functions.

You can write your Hello World and then see how it compares to my
example:

http://www.project-fbin.hostoi.com/nasmhints/hello/HELLO.NSM.html

For a floppy bootloader topic,

http://www.project-fbin.hostoi.com/nasmhints/rt_hints.htm

For a more involved NASM project to view raw sectors on a 3 1/2 fat12
floppy:

http://www.project-fbin.hostoi.com/Proj_Flop_See/RT_Flop_See.HTML

Enjoy!

ps. the root index for the above..

http://www.project-fbin.hostoi.com/index.htm

Steve

> Thanks
> Darren

James Harris

unread,
Nov 27, 2009, 6:32:44 PM11/27/09
to

On 27 Nov, 17:42, Darren Gansberg <darm...@MUNGED.microcosmotalk.com>
wrote:

> Hi I am hobbyist and this is my first "post" to a newsgroup of this
> nature so I apologise in advance if i fail to observe etablished
> conventions.

Welcome to the group!

> I am interested in writing programs in x86 assembly (I'm using NASM)
> running in 16 bit real mode (ultimately a bootloader like program) that
> will target the Intel 386 and upwards as it seems is is the lowest
> common denominator in Intel x86 line of processors.
>
> I thought my best starting point would be to write a simple "hello
> world" like program. That is a program that printed text to the screen
> so that i had a means of tracking what was going on. Which of course
> leads me to relying upon interrupts to access bios services.
>
> Whilst I am aware of RBIL, just looking through the list(s) it appears
> that the list identifies interrupts as they apply to only some bioses
> and hardware as well as possibly some common base that would be

> available in "all" bioses. =A0As a result I am finding it somewhat


> difficult to ascertain from the list what could be regarded as "standard
> calls" (apologies if the terminology isnt correct).

In addition to what others have said bear in mind that if you call an
unsupported BIOS function - say 0x10 56 - the BIOS should return the
carry flag set. Check the flag after each call so you can see which
calls are supported and which are not.

Generally for something like int 0x10 you only need the lower system
BIOS numbers such as 0x0e (write teletype output) and these have been
present in BIOSes since long long ago.

> I was wondering if someone could possibly point me in the right
> direction to working out the common base that would be available to say
> like a bootloader program that would function correctly all the time?

There is a number of floppy bootloaders on the web. If it helps, mine
and one by Mike Gonta are at

http://codewiki.wikispaces.com/os+development

Given your subject area there is another newsgroup alt.os.development
which you may find helpful.

James

0 new messages