Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mode 13h
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Notation == <code>13h</code> refers to the number 19 written in the hexadecimal notation in a format typical of assembly code for Intel processors. In [[C (programming language)|the C programming language]], hexadecimal 13 is written <code>0x13</code>. In [[x86 assembly language]] the video mode is entered by setting the ''AL'' register to 13h, the ''AH'' register to 0, and then calling [[INT 10h|BIOS interrupt 10h]].<ref name="Brown">{{cite web |url=http://www.ctyme.com/intr/rb-0069.htm |title=Ralf Brown's Interrupt List |access-date=2018-08-24 |author-first=Ralf D. |author-last=Brown |author-link=Ralf D. Brown}}</ref> The two 8-bit registers ''AL'' and ''AH'' comprise the 16-bit ''AX'' register. Although 13<sub>[[Hexadecimal|hex]]</sub> is 19 in decimal, in [[QuickBASIC]]'s screen mode numbering scheme it is simply screen mode 13 (not hexadecimal).<ref name="SCREEN_13">{{cite web |url=http://www.qbasicnews.com/qboho/qckadvr.m111213.shtml |title=Microsoft QuickBasic 4.5 Advisor |access-date=2007-07-19 |date=1990 |publisher=[[Microsoft]] |archive-date=2009-01-05 |archive-url=https://web.archive.org/web/20090105235430/http://www.qbasicnews.com/qboho/qckadvr.m111213.shtml |url-status=dead }}</ref> Many QuickBASIC screen modes have numbers which differ from the BIOS modes on which they are based.<ref>A major example is QuickBASIC screen mode 0, which covers all of the BIOS text modes 00h..03h. Also, QuickBASIC screen modes 1 and 2 correspond to the CGA BIOS modes 04h through 06h. Further note that QuickBASIC has modes for the [[Hercules Graphics Card|Hercules graphics mode]], which has no standard BIOS support at all, and for [[Olivetti M24#CGA compatible video card|Olivetti/AT&T extended-CGA graphics modes]].</ref> === Source code examples === Assembly code to enter Mode 13h: <syntaxhighlight lang="asm"> mov ax, 0013h int 10h </syntaxhighlight> As an illustration of mode 13h in a video game source code, [[Wolfenstein 3D]] includes this function in a file named "ID_VL.C". It enters mode 13h by using two assembly instructions (prefixed with <code>asm</code>) embedded in the C source code.<ref>https://github.com/id-Software/wolf3d/blob/master/WOLFSRC/ID_VL.C#L108</ref> This function also executes three other functions. <syntaxhighlight lang="c"> void VL_SetVGAPlaneMode (void) { asm mov ax,0x13 asm int 0x10 VL_DePlaneVGA (); VGAMAPMASK(15); VL_SetLineWidth (40); } </syntaxhighlight> ''[[Wolfenstein 3D]] source code (circa 1992) which calls the BIOS to change to mode 13h.''
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)