SlideShare a Scribd company logo
1 of 8
FILENAME: BIOSMAC.DOC
DESCRIPTION: This file documents the BIOS interface macros implemented in
the files IBIOS.MAC and MBIOS.MAC. Note that the only difference between the
two files is that IBIOS.MAC uses TASM's Ideal mode while MBIOS.MAC uses
TASM's MASM mode.
CallBIOS
--------
Function: Calls the specified BIOS interrupt/service.
Input
Interrupt - Interrupt number
Service - Service number
Output
none
Registers modified: ah, flags
Syntax: CallBIOS Interrupt, Service
LoadBH
------
Function: Loads BH with the a value. Presumably the video page. If no value
is provided BH is initialized to 0.
Input
Value - value to put in BH
Output
none
Registers modified: bh
Syntax: LoadBH Value
SetVideoMode
------------
Function: Sets the current video mode.
BIOS Interrupt: 10h Service: 00h
Input
Mode - new video mode as defined below
---- ----------------------------------------------------
0h 40x25 Black and White
1h 40X25 Color
2h 80x25 Black and White
3h 80x25 Color
4h 320x200 4-Color graphics
5h 320x200 4-Color graphics(color burst off)
6h 640x200 2-Color graphics
7h Monochrome adapter Text display
8h 160x200 16-Color graphics(PCjr)
9h 320x200 16-Color graphics(PCjr)
0Ah 640x200 4-Color graphics(PCjr)
0Dh 320x200 16-Color graphics(EGA)
0Eh 640x200 16-Color graphics(EGA)
0Fh 640x350 Monochrome graphics(EGA)
10h 640x350 4-Color or 16-Color graphics(EGA)(depends on
available RAM)
11h 640x480 2-Color graphics(VGA)
12h 640x480 16-Color graphics(VGA)
13h 320x200 256-Color graphics(VGA)
----------------------------------------------------
Output
none
Registers modified: ah, Flags
Syntax: SetVideoMode Mode
SetCursorShape
--------------
Function: Sets the cursors shape. The parameters passed to it indicate the
starting and ending scan lines to use when displaying the cursor.
On a monochrome system the default setting is lines 6-7. Setting
the scan lines to 0-7 would result in a block cursor. On a color
system the default setting is 14-15. Setting the starting scan line
to 15 and the ending scan line to 0 would result in a cursor with a
line on the top and bottom.
BIOS Interrupt: 10h Service: 01h
Input
Starting - starting scan line
Ending - ending scan line
Output
none
Registers modified: ah, cx, Flags
Syntax: SetCursorShape Starting, Ending
GotoXY
------
Function: Positions the cursor.The new cursor position is provided in the
parameters Row and Column. The caller can optionally provide the
video page to use. If Page isn't defined, page 0 is assumed.
BIOS Interrupt: 10h Service: 02h
Input
Row (y coordinate)
Column (x coordinate)
Page - Display page to check
Output
none
Register modified: ax, bh, dx, Flags
Syntax: GotoXY Row, Column, Page
WhereXY
-------
Function: Determines the current cursor position and the cursor's shape. The
Page parameter indicates the video page to check and is optional.
If the Page parameter is not specified, page 0 is assumed.
BIOS Interrupt: 10h Service: 03h
Input
Page - Display page to check
Output
ch - Starting line for cursor
cl - Ending line for cursor
dh - row (y coordinate)
dl - column (x coordinate)
Register modified: ax, cx, dx, Flags
Syntax: WhereXY Page
GetCursorShape
--------------
Function: Returns the shape of the cursor. Note that because the BIOS call to
get the cursor's position returns this information we simply call
the WhereXY macro.
BIOS Interrupt: 10h Service: 03h
Input
none
Output
ch - starting scan line of cursor
cl - ending scan line of cursor
Registers modified: ax, cx, dx, Flags
Syntax: GetCursorShape
GetLightPenPos
--------------
Function: Returns the position of the light pen.
BIOS Interrupt: 10h Service: 04h
Input
none
Output
ah = 0 - light pen not down/not triggered
1 - light pen down/triggered
ch - pixel vertical coordinate
bx - pixel horizontal coordinate
dh - character vertical coordinate
dl - character horizontal coordinate
Registers modified: ah, bx, ch, dx, Flags
Syntax: GetLightPenPos
SetDisplayPage
--------------
Function: Sets the current display page. Note that the Page parameter is
optional. If it is not provided, video page 0 is used.
BIOS Interrupt: 10h Service: 05h
Input
Page - Desired display page as defined below
PAGE MODE HARDWARE
---- ---- --------
0-7 00h and 01h CGA
0-3 02h and 03h CGA
0-7 02h and 03h EGA
0-7 0Dh EGA
0-3 0Eh EGA
0-1 0Fh EGA
0-1 10h EGA
Output
none
Registers modified: ah, Flags
Syntax: SetDisplayPage Page
ScrollUp
--------
Function: Scrolls the indicated part of the screen up LineCount times. Any
blank lines created are initialized to the color indicated in the
Attrib parameter. The coordinate parameters are optional. If they
are not provided, the routine scrolls the entire screen. The routine
assumes there are 80 columns on the screen. However, it checks how
many lines are currently available (25/43/50) if the coordinate
parameters aren't provided.
BIOS Interrupt: 10h Service: 06h
Input
LineCount - # of lines to scroll
Attrib - Attribute to use for new lines
x1 - Upper left column
y1 - Upper row
x2 - Lower right column
y2 - Bottom row
Output
none
Registers modified: ax, bh, cx, dx, Flags
Syntax: ScrollUp LineCount, Attrib, x1, y1, x2, y2
ScrollDown
----------
Function: Scrolls the indicated part of the screen down LineCount times. Any
blank lines created are initialized to the color indicated in the
Attrib parameter. The coordinate parameters are optional. If they
are not provided, the routine scrolls the entire screen. The routine
assumes there are 80 columns on the screen. However, it checks how
many lines are currently available(25/43/50) if the coordinate
parameters aren't provided.
BIOS Interrupt: 10h Service: 07h
Input
LineCount - # of lines to scroll
Attrib - Attribute to use for new lines
x1 - Upper left column
y1 - Upper row
x2 - Lower right column
y2 - Bottom row
Output
none
Registers modified: ax, bh, cx, dx, Flags
Syntax: ScrollDown LineCount, Attrib, x1, y1, x2, y2
GetCharAttr
-----------
Function: Reads the character and attribute at the current cursor position of
the indicated video page. See SetDisplayPage for a definition of
the different video pages available. Note that the Page parameter
is optional. If it is not provided, video page 0 is used.
BIOS Interrupt: 10h Service: 08h
Input
Page - the video page to check
Output
ah - attribute
al - character
Registers modified: ax
Syntax: GetCharAttr Page
PutCharAttr
-----------
Function: Displays a character and attribute 'Count' times starting at the
current cursor position of the indicated page. Note that the Page
parameter is optional. If it is not provided, video page 0 is used.
BIOS Interrupt: 10h Service: 09h
Input
Character - character to display
Attribute - attribute to display the character(s) in
Count - number of times to display the character
Page - Video page to display the characters on
Output
none
Registers modified: ax, bx, cx, Flags
Syntax: PutCharAttr Character, Attribute, Count, Page
PutChar
-------
Function: Displays a character Count times beginning at the current cursor
position on the indicated display page. Note that the Page and
Color parameters are optional. If you provide the Color parameter,
you must also provide the Page parameter. If the Page parameter is
not provided, video page 0 is used. If the Color is not provided,
the character attribute of the current cursor location of the
indicate video page is used.
BIOS Interrupt: 10h Service: 0Ah
Input
Character - character to display
Count - number of times to display the character
Page - video page to display character(s) on
Output
none
Registers modified: ax, bx, cx, Flags
Syntax: PutChar Character, Count, Page, Color
SetColorPalette
---------------
Function: Sets the CGA color palette that is used while displaying graphics
in 320x200 graphics mode(4 & 5). For more information on video
modes, see SetVideoMode above.
BIOS Interrupt: 10h Service: 0Bh
Input
Entry - Color palette id being set
Color - New color for palette entry
Output
none
Registers modified: ah, bx, Flags
Syntax: SetColorPalette Entry, Color
PutPixel
--------
Function: Displays a pixel on the screen. Note that the macro may only be
called while in graphics mode.
BIOS Interrupt: 10h Service: 0Ch
Input
X - horizontal position
Y - vertical position
Color - color/display method for pixel
Output
none
Registers modified: ax, cx, dx, Flags
Syntax: PutPixel X, Y, Color
GetPixel
--------
Function: Reads information about the indicated pixel.
BIOS Interrupt: 10h Service: 0Dh
Input
X - horizontal position
Y - vertical position
Output
al - pixel information
Registers modified: ax, cx, dx, Flags
Syntax: GetPixel X, Y
PutTTY
------
Function: Displays text to the console using teletype mode. Note that the
Color parameter is optional. If the Color parameter isn't provided,
the character will be displayed using the attribute of the current
cursor position.
BIOS Interrupt: 10h Service: 0Eh
Input
Character - character to display
Color - color to display text in.
Page - video page to display character(s) on
Output
none
Registers modified: ax, bx, Flags
Syntax: PutTTY Character, Page, Color
GetVideoMode
------------
Function: Determines the current video mode and display page.
BIOS Interrupt: 10h Service: 0Fh
Input
None
Output
ah - Number of columns on screen
al - display mode as defined below
---- ----------------------------------------------------
0h 40x25 Black and White
1h 40X25 Color
2h 80x25 Black and White
3h 80x25 Color
4h 320x200 4-Color graphics
5h 320x200 4-Color graphics(color burst off)
6h 640x200 2-Color graphics
7h Monochrome adapter Text display
8h 160x200 16-Color graphics(PCjr)
9h 320x200 16-Color graphics(PCjr)
0Ah 640x200 4-Color graphics(PCjr)
0Dh 320x200 16-Color graphics(EGA)
0Eh 640x200 16-Color graphics(EGA)
0Fh 640x350 Monochrome graphics(EGA)
10h 640x350 4-Color or 16-Color graphics(EGA)(depends on
available RAM)
11h 640x480 2-Color graphics(VGA)
12h 640x480 16-Color graphics(VGA)
13h 320x200 256-Color graphics(VGA)
----------------------------------------------------
bh - Active display page
Register modified: ax, bx, Flags
Syntax: GetVideoMode
SetPaletteRegs
--------------
Function: Sets the EGA palette colors. Note that the macro may only be called
when running on an EGA.
BIOS Interrupt: 10h Service: 10h
Input
SubService - Select service as defined below
SERVICE FUNCTION
------- -----------------------------------------------------
0 If setting palette register
1 If setting border color register
2 If setting all palette registers and border register
3 If toggling blink/intensity bit(EGA only)
-----------------------------------------------------------------
IndexIntensity - palette register or blink/intensity bit as
defined below.
SERVICE FUNCTION
------- -------------------------------------------------
SubService = 0 Palette register to set
SubService = 3 IndexIntensity = 0 - Enable intensity
IndexIntensity = 1 - Enable blinking
-----------------------------------------------------------------
Color - color to store in register
ListSeg:ListOfs - address of new palette list
Output
none
Registers modified: ax, bx, dx, es, Flags
Syntax: SetPaletteRegs SubService, IndexIntensity, Color, ListSeg, ListOfs
ScreenRows
----------
Function: Returns the number of rows available on the screen.
BIOS Interrupt: 10h Service: 11h
Input
none
Output
dl - # of rows on the screen(25/43/50)
Registers modified: ax, dl, Flags
Syntax: ScreenRows
PutString
---------
Function: Displays a string to the indicated video page at the indicated
position. Note that the Page and Attribute parameters are optional.
If Page is not supplied, the macro will use page 0 by default. If
Mode = 0 or 1, Attribute must be supplied. If Mode = 2 or 3,
Attribute should not be supplied. Note that if you provide the
Attribute parameter, you must provide the Page parameter also. This
macro may only be used on IBM-AT, PS/2 and compatible machines.
BIOS Interrupt: 10h Service: 13h
Input
Mode - mode to write string in as defined below
MODE FUNCTION
---- --------
0 Attribute in bl, string contains character codes only,
cursor position isn't updated after write.
1 Attribute in bl, string contains character codes only,
cursor position is updated after write.
2 String contains alternating character codes and
attribute bytes, cursor position isn't updated after
write.
3 String contains alternating character codes and
attribute bytes, cursor position is updated after write.
--------------------------------------------------------------------
X - Vertical position to begin display of the string
Y - Horizontal position to begin display of the string.
StringSeg - Segment address of the string
StringOfs - Offset address of string in StringSeg
Length - Length of the string to be displayed
Page - Video page to display string to
Attribute - Optional parameter that indicates the attribute to
display the string in. This parameter should only be
provided if Mode = 0 or 1.
Output
none
Registers modified: ax, bx, cx, dx, bp, es, Flags
Syntax: PutString Mode, X, Y, StringSeg, StringOfs, Length, Page, Attribute
GetChar
-------
Function: Returns the next character in the BIOS keyboard buffer.
BIOS Interrupt: 16h Service: 00h
Input
none
Output
ah - keyboard scan code
al - ASCII character
Registers modified: ax, Flags
Syntax: GetChar
GetKbdStatus
------------
Function: Returns the BIOS keyboard status.
BIOS Interrupt: 16h Service: 01h
Input
none
Output
If key wating to be input:
Zero flag - clear
ah - keyboard scan code
al - ASCII character
If no key waiting to be input:
Zero flag - set
Registers modified: ax, Flags
Syntax: GetKbdStatus
GetKbdFlags
-----------
Function: Returns the BIOS keyboard flags.
BIOS Interrupt: 16h Service: 02h
Input
none
Output
al - BIOS keyboard flags byte:
BIT FUNCTION
--- --------
7 Insert ON
6 Caps Lock ON
5 Num Lock ON
4 Scroll Lock ON
3 Alt key DOWN
2 Ctrl key DOWN
1 Left-Shift key DOWN
0 Right-Shift key DOWN
Registers modified: al, Flags
Syntax: GetKbdFlags

More Related Content

Viewers also liked (7)

Manual hot potatoes
Manual hot potatoesManual hot potatoes
Manual hot potatoes
 
El lenguaje de la imagen
El lenguaje de la imagenEl lenguaje de la imagen
El lenguaje de la imagen
 
Ictericia 3
Ictericia 3Ictericia 3
Ictericia 3
 
Diploma in civil engineering with 31 years experience both in project & main...
Diploma in civil engineering with 31 years experience both in project  & main...Diploma in civil engineering with 31 years experience both in project  & main...
Diploma in civil engineering with 31 years experience both in project & main...
 
Presentación sobre educación en los medios
Presentación sobre educación en los mediosPresentación sobre educación en los medios
Presentación sobre educación en los medios
 
Ilusiones opticas
Ilusiones opticasIlusiones opticas
Ilusiones opticas
 
CV Summary Y Schoeman
CV Summary Y SchoemanCV Summary Y Schoeman
CV Summary Y Schoeman
 

Similar to Biosmac

Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interuptsSHREEHARI WADAWADAGI
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interruptTech_MX
 
Gameboy emulator in rust and web assembly
Gameboy emulator in rust and web assemblyGameboy emulator in rust and web assembly
Gameboy emulator in rust and web assemblyYodalee
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptxHebaEng
 
Sothink Video Encoder Engine for Adobe Flash (Linux Version)
Sothink Video Encoder Engine for Adobe Flash (Linux Version)Sothink Video Encoder Engine for Adobe Flash (Linux Version)
Sothink Video Encoder Engine for Adobe Flash (Linux Version)webhostingguy
 
Splash screen for Embedded Linux 101: How to customize your boot sequence
 Splash screen for Embedded Linux 101: How to customize your boot sequence Splash screen for Embedded Linux 101: How to customize your boot sequence
Splash screen for Embedded Linux 101: How to customize your boot sequencePierre-jean Texier
 
Chapter 2 The 8088 Microprocessor
Chapter 2   The 8088 MicroprocessorChapter 2   The 8088 Microprocessor
Chapter 2 The 8088 MicroprocessorDwight Sabio
 
Jfif3 restrict1108218813
Jfif3 restrict1108218813Jfif3 restrict1108218813
Jfif3 restrict1108218813Ben Murray
 
Jfif3 restrict1108218813
Jfif3 restrict1108218813Jfif3 restrict1108218813
Jfif3 restrict1108218813Ben Murray
 
CP600 training presentation_rev2.pptx
CP600 training presentation_rev2.pptxCP600 training presentation_rev2.pptx
CP600 training presentation_rev2.pptxFbioPassosGuimares1
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2Motaz Saad
 
GSP 215 RANK Become Exceptional--gsp215rank.com
GSP 215 RANK Become Exceptional--gsp215rank.comGSP 215 RANK Become Exceptional--gsp215rank.com
GSP 215 RANK Become Exceptional--gsp215rank.comclaric119
 

Similar to Biosmac (20)

Brief description of all the interupts
Brief description of all the interuptsBrief description of all the interupts
Brief description of all the interupts
 
int 21 h for screen display
int 21 h for screen displayint 21 h for screen display
int 21 h for screen display
 
Atari 2600 VCS Programming
Atari 2600 VCS ProgrammingAtari 2600 VCS Programming
Atari 2600 VCS Programming
 
Lecture6
Lecture6Lecture6
Lecture6
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 
Gameboy emulator in rust and web assembly
Gameboy emulator in rust and web assemblyGameboy emulator in rust and web assembly
Gameboy emulator in rust and web assembly
 
Qemu Pcie
Qemu PcieQemu Pcie
Qemu Pcie
 
Home works summary.pptx
Home works summary.pptxHome works summary.pptx
Home works summary.pptx
 
Sothink Video Encoder Engine for Adobe Flash (Linux Version)
Sothink Video Encoder Engine for Adobe Flash (Linux Version)Sothink Video Encoder Engine for Adobe Flash (Linux Version)
Sothink Video Encoder Engine for Adobe Flash (Linux Version)
 
Splash screen for Embedded Linux 101: How to customize your boot sequence
 Splash screen for Embedded Linux 101: How to customize your boot sequence Splash screen for Embedded Linux 101: How to customize your boot sequence
Splash screen for Embedded Linux 101: How to customize your boot sequence
 
Chapter 2 The 8088 Microprocessor
Chapter 2   The 8088 MicroprocessorChapter 2   The 8088 Microprocessor
Chapter 2 The 8088 Microprocessor
 
Files 3-handouts lecture-12
Files 3-handouts lecture-12Files 3-handouts lecture-12
Files 3-handouts lecture-12
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Jfif3 restrict1108218813
Jfif3 restrict1108218813Jfif3 restrict1108218813
Jfif3 restrict1108218813
 
Jfif3 restrict1108218813
Jfif3 restrict1108218813Jfif3 restrict1108218813
Jfif3 restrict1108218813
 
staOS
staOSstaOS
staOS
 
CP600 training presentation_rev2.pptx
CP600 training presentation_rev2.pptxCP600 training presentation_rev2.pptx
CP600 training presentation_rev2.pptx
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2
 
8086 architecture
8086 architecture8086 architecture
8086 architecture
 
GSP 215 RANK Become Exceptional--gsp215rank.com
GSP 215 RANK Become Exceptional--gsp215rank.comGSP 215 RANK Become Exceptional--gsp215rank.com
GSP 215 RANK Become Exceptional--gsp215rank.com
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Biosmac

  • 1. FILENAME: BIOSMAC.DOC DESCRIPTION: This file documents the BIOS interface macros implemented in the files IBIOS.MAC and MBIOS.MAC. Note that the only difference between the two files is that IBIOS.MAC uses TASM's Ideal mode while MBIOS.MAC uses TASM's MASM mode. CallBIOS -------- Function: Calls the specified BIOS interrupt/service. Input Interrupt - Interrupt number Service - Service number Output none Registers modified: ah, flags Syntax: CallBIOS Interrupt, Service LoadBH ------ Function: Loads BH with the a value. Presumably the video page. If no value is provided BH is initialized to 0. Input Value - value to put in BH Output none Registers modified: bh Syntax: LoadBH Value SetVideoMode ------------ Function: Sets the current video mode. BIOS Interrupt: 10h Service: 00h Input Mode - new video mode as defined below ---- ---------------------------------------------------- 0h 40x25 Black and White 1h 40X25 Color 2h 80x25 Black and White 3h 80x25 Color 4h 320x200 4-Color graphics 5h 320x200 4-Color graphics(color burst off) 6h 640x200 2-Color graphics 7h Monochrome adapter Text display 8h 160x200 16-Color graphics(PCjr) 9h 320x200 16-Color graphics(PCjr) 0Ah 640x200 4-Color graphics(PCjr) 0Dh 320x200 16-Color graphics(EGA) 0Eh 640x200 16-Color graphics(EGA) 0Fh 640x350 Monochrome graphics(EGA) 10h 640x350 4-Color or 16-Color graphics(EGA)(depends on available RAM) 11h 640x480 2-Color graphics(VGA) 12h 640x480 16-Color graphics(VGA) 13h 320x200 256-Color graphics(VGA) ---------------------------------------------------- Output none Registers modified: ah, Flags Syntax: SetVideoMode Mode
  • 2. SetCursorShape -------------- Function: Sets the cursors shape. The parameters passed to it indicate the starting and ending scan lines to use when displaying the cursor. On a monochrome system the default setting is lines 6-7. Setting the scan lines to 0-7 would result in a block cursor. On a color system the default setting is 14-15. Setting the starting scan line to 15 and the ending scan line to 0 would result in a cursor with a line on the top and bottom. BIOS Interrupt: 10h Service: 01h Input Starting - starting scan line Ending - ending scan line Output none Registers modified: ah, cx, Flags Syntax: SetCursorShape Starting, Ending GotoXY ------ Function: Positions the cursor.The new cursor position is provided in the parameters Row and Column. The caller can optionally provide the video page to use. If Page isn't defined, page 0 is assumed. BIOS Interrupt: 10h Service: 02h Input Row (y coordinate) Column (x coordinate) Page - Display page to check Output none Register modified: ax, bh, dx, Flags Syntax: GotoXY Row, Column, Page WhereXY ------- Function: Determines the current cursor position and the cursor's shape. The Page parameter indicates the video page to check and is optional. If the Page parameter is not specified, page 0 is assumed. BIOS Interrupt: 10h Service: 03h Input Page - Display page to check Output ch - Starting line for cursor cl - Ending line for cursor dh - row (y coordinate) dl - column (x coordinate) Register modified: ax, cx, dx, Flags Syntax: WhereXY Page GetCursorShape -------------- Function: Returns the shape of the cursor. Note that because the BIOS call to get the cursor's position returns this information we simply call the WhereXY macro. BIOS Interrupt: 10h Service: 03h Input none Output ch - starting scan line of cursor cl - ending scan line of cursor Registers modified: ax, cx, dx, Flags Syntax: GetCursorShape
  • 3. GetLightPenPos -------------- Function: Returns the position of the light pen. BIOS Interrupt: 10h Service: 04h Input none Output ah = 0 - light pen not down/not triggered 1 - light pen down/triggered ch - pixel vertical coordinate bx - pixel horizontal coordinate dh - character vertical coordinate dl - character horizontal coordinate Registers modified: ah, bx, ch, dx, Flags Syntax: GetLightPenPos SetDisplayPage -------------- Function: Sets the current display page. Note that the Page parameter is optional. If it is not provided, video page 0 is used. BIOS Interrupt: 10h Service: 05h Input Page - Desired display page as defined below PAGE MODE HARDWARE ---- ---- -------- 0-7 00h and 01h CGA 0-3 02h and 03h CGA 0-7 02h and 03h EGA 0-7 0Dh EGA 0-3 0Eh EGA 0-1 0Fh EGA 0-1 10h EGA Output none Registers modified: ah, Flags Syntax: SetDisplayPage Page ScrollUp -------- Function: Scrolls the indicated part of the screen up LineCount times. Any blank lines created are initialized to the color indicated in the Attrib parameter. The coordinate parameters are optional. If they are not provided, the routine scrolls the entire screen. The routine assumes there are 80 columns on the screen. However, it checks how many lines are currently available (25/43/50) if the coordinate parameters aren't provided. BIOS Interrupt: 10h Service: 06h Input LineCount - # of lines to scroll Attrib - Attribute to use for new lines x1 - Upper left column y1 - Upper row x2 - Lower right column y2 - Bottom row Output none Registers modified: ax, bh, cx, dx, Flags Syntax: ScrollUp LineCount, Attrib, x1, y1, x2, y2 ScrollDown ---------- Function: Scrolls the indicated part of the screen down LineCount times. Any blank lines created are initialized to the color indicated in the
  • 4. Attrib parameter. The coordinate parameters are optional. If they are not provided, the routine scrolls the entire screen. The routine assumes there are 80 columns on the screen. However, it checks how many lines are currently available(25/43/50) if the coordinate parameters aren't provided. BIOS Interrupt: 10h Service: 07h Input LineCount - # of lines to scroll Attrib - Attribute to use for new lines x1 - Upper left column y1 - Upper row x2 - Lower right column y2 - Bottom row Output none Registers modified: ax, bh, cx, dx, Flags Syntax: ScrollDown LineCount, Attrib, x1, y1, x2, y2 GetCharAttr ----------- Function: Reads the character and attribute at the current cursor position of the indicated video page. See SetDisplayPage for a definition of the different video pages available. Note that the Page parameter is optional. If it is not provided, video page 0 is used. BIOS Interrupt: 10h Service: 08h Input Page - the video page to check Output ah - attribute al - character Registers modified: ax Syntax: GetCharAttr Page PutCharAttr ----------- Function: Displays a character and attribute 'Count' times starting at the current cursor position of the indicated page. Note that the Page parameter is optional. If it is not provided, video page 0 is used. BIOS Interrupt: 10h Service: 09h Input Character - character to display Attribute - attribute to display the character(s) in Count - number of times to display the character Page - Video page to display the characters on Output none Registers modified: ax, bx, cx, Flags Syntax: PutCharAttr Character, Attribute, Count, Page PutChar ------- Function: Displays a character Count times beginning at the current cursor position on the indicated display page. Note that the Page and Color parameters are optional. If you provide the Color parameter, you must also provide the Page parameter. If the Page parameter is not provided, video page 0 is used. If the Color is not provided, the character attribute of the current cursor location of the indicate video page is used. BIOS Interrupt: 10h Service: 0Ah Input Character - character to display Count - number of times to display the character Page - video page to display character(s) on Output
  • 5. none Registers modified: ax, bx, cx, Flags Syntax: PutChar Character, Count, Page, Color SetColorPalette --------------- Function: Sets the CGA color palette that is used while displaying graphics in 320x200 graphics mode(4 & 5). For more information on video modes, see SetVideoMode above. BIOS Interrupt: 10h Service: 0Bh Input Entry - Color palette id being set Color - New color for palette entry Output none Registers modified: ah, bx, Flags Syntax: SetColorPalette Entry, Color PutPixel -------- Function: Displays a pixel on the screen. Note that the macro may only be called while in graphics mode. BIOS Interrupt: 10h Service: 0Ch Input X - horizontal position Y - vertical position Color - color/display method for pixel Output none Registers modified: ax, cx, dx, Flags Syntax: PutPixel X, Y, Color GetPixel -------- Function: Reads information about the indicated pixel. BIOS Interrupt: 10h Service: 0Dh Input X - horizontal position Y - vertical position Output al - pixel information Registers modified: ax, cx, dx, Flags Syntax: GetPixel X, Y PutTTY ------ Function: Displays text to the console using teletype mode. Note that the Color parameter is optional. If the Color parameter isn't provided, the character will be displayed using the attribute of the current cursor position. BIOS Interrupt: 10h Service: 0Eh Input Character - character to display Color - color to display text in. Page - video page to display character(s) on Output none Registers modified: ax, bx, Flags Syntax: PutTTY Character, Page, Color GetVideoMode ------------ Function: Determines the current video mode and display page. BIOS Interrupt: 10h Service: 0Fh
  • 6. Input None Output ah - Number of columns on screen al - display mode as defined below ---- ---------------------------------------------------- 0h 40x25 Black and White 1h 40X25 Color 2h 80x25 Black and White 3h 80x25 Color 4h 320x200 4-Color graphics 5h 320x200 4-Color graphics(color burst off) 6h 640x200 2-Color graphics 7h Monochrome adapter Text display 8h 160x200 16-Color graphics(PCjr) 9h 320x200 16-Color graphics(PCjr) 0Ah 640x200 4-Color graphics(PCjr) 0Dh 320x200 16-Color graphics(EGA) 0Eh 640x200 16-Color graphics(EGA) 0Fh 640x350 Monochrome graphics(EGA) 10h 640x350 4-Color or 16-Color graphics(EGA)(depends on available RAM) 11h 640x480 2-Color graphics(VGA) 12h 640x480 16-Color graphics(VGA) 13h 320x200 256-Color graphics(VGA) ---------------------------------------------------- bh - Active display page Register modified: ax, bx, Flags Syntax: GetVideoMode SetPaletteRegs -------------- Function: Sets the EGA palette colors. Note that the macro may only be called when running on an EGA. BIOS Interrupt: 10h Service: 10h Input SubService - Select service as defined below SERVICE FUNCTION ------- ----------------------------------------------------- 0 If setting palette register 1 If setting border color register 2 If setting all palette registers and border register 3 If toggling blink/intensity bit(EGA only) ----------------------------------------------------------------- IndexIntensity - palette register or blink/intensity bit as defined below. SERVICE FUNCTION ------- ------------------------------------------------- SubService = 0 Palette register to set SubService = 3 IndexIntensity = 0 - Enable intensity IndexIntensity = 1 - Enable blinking ----------------------------------------------------------------- Color - color to store in register ListSeg:ListOfs - address of new palette list Output none Registers modified: ax, bx, dx, es, Flags Syntax: SetPaletteRegs SubService, IndexIntensity, Color, ListSeg, ListOfs ScreenRows ---------- Function: Returns the number of rows available on the screen. BIOS Interrupt: 10h Service: 11h Input
  • 7. none Output dl - # of rows on the screen(25/43/50) Registers modified: ax, dl, Flags Syntax: ScreenRows PutString --------- Function: Displays a string to the indicated video page at the indicated position. Note that the Page and Attribute parameters are optional. If Page is not supplied, the macro will use page 0 by default. If Mode = 0 or 1, Attribute must be supplied. If Mode = 2 or 3, Attribute should not be supplied. Note that if you provide the Attribute parameter, you must provide the Page parameter also. This macro may only be used on IBM-AT, PS/2 and compatible machines. BIOS Interrupt: 10h Service: 13h Input Mode - mode to write string in as defined below MODE FUNCTION ---- -------- 0 Attribute in bl, string contains character codes only, cursor position isn't updated after write. 1 Attribute in bl, string contains character codes only, cursor position is updated after write. 2 String contains alternating character codes and attribute bytes, cursor position isn't updated after write. 3 String contains alternating character codes and attribute bytes, cursor position is updated after write. -------------------------------------------------------------------- X - Vertical position to begin display of the string Y - Horizontal position to begin display of the string. StringSeg - Segment address of the string StringOfs - Offset address of string in StringSeg Length - Length of the string to be displayed Page - Video page to display string to Attribute - Optional parameter that indicates the attribute to display the string in. This parameter should only be provided if Mode = 0 or 1. Output none Registers modified: ax, bx, cx, dx, bp, es, Flags Syntax: PutString Mode, X, Y, StringSeg, StringOfs, Length, Page, Attribute GetChar ------- Function: Returns the next character in the BIOS keyboard buffer. BIOS Interrupt: 16h Service: 00h Input none Output ah - keyboard scan code al - ASCII character Registers modified: ax, Flags Syntax: GetChar GetKbdStatus ------------ Function: Returns the BIOS keyboard status. BIOS Interrupt: 16h Service: 01h Input none Output If key wating to be input:
  • 8. Zero flag - clear ah - keyboard scan code al - ASCII character If no key waiting to be input: Zero flag - set Registers modified: ax, Flags Syntax: GetKbdStatus GetKbdFlags ----------- Function: Returns the BIOS keyboard flags. BIOS Interrupt: 16h Service: 02h Input none Output al - BIOS keyboard flags byte: BIT FUNCTION --- -------- 7 Insert ON 6 Caps Lock ON 5 Num Lock ON 4 Scroll Lock ON 3 Alt key DOWN 2 Ctrl key DOWN 1 Left-Shift key DOWN 0 Right-Shift key DOWN Registers modified: al, Flags Syntax: GetKbdFlags