-
Notifications
You must be signed in to change notification settings - Fork 0
/
INTERRUP.TXT
8822 lines (6317 loc) · 235 KB
/
INTERRUP.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@Interrupt Services DOSùBIOSùEMSùMouse
:int table:interrupt table:exceptions:IRQ
^Intel Defined CPU Exception Table (see notes)
% Interrupt Function
0 Divide by zero
1 Single step
2 Non-maskable (NMI)
3 Breakpoint
4 Overflow trap
5 BOUND range exceeded (186,286,386)
6 Invalid opcode (186,286,386)
7 Coprocessor not available (286,386)
8 Double fault exception (286,386)
9 Coprocessor segment overrun (286,386)
A Invalid task state segment (286,386)
B Segment not present (286,386)
C Stack exception (286,386)
D General protection exception (286,386)
E Page fault (286,386)
F Reserved
10 Coprocessor error (286,386)
^IBM PC Hardware Interrupt Table (in order of priority)
% IRQ# Interrupt Function
IRQ0 8 ~timer~ (55ms intervals, 18.2 per second)
IRQ1 9 keyboard service required
IRQ2 A slave ~8259~ or EGA/VGA vertical retrace
IRQ8 70 real time clock (AT,XT286,PS50+)
IRQ9 71 software redirected to IRQ2 (AT,XT286,PS50+)
IRQ10 72 reserved (AT,XT286,PS50+)
IRQ11 73 reserved (AT,XT286,PS50+)
IRQ12 74 mouse interrupt (PS50+)
IRQ13 75 numeric coprocessor error (AT,XT286,PS50+)
IRQ14 76 fixed disk controller (AT,XT286,PS50+)
IRQ15 77 reserved (AT,XT286,PS50+)
IRQ3 B COM2 or COM4 service required, (COM3-COM8 on MCA PS/2)
IRQ4 C COM1 or COM3 service required
IRQ5 D fixed disk or data request from LPT2
IRQ6 E floppy disk service required
IRQ7 F data request from LPT1 (unreliable on IBM mono)
^Interrupt Table as Implemented by System BIOS/DOS
% INT # Locus Function
0 CPU divide by zero
1 CPU single step
2 CPU non-maskable
3 CPU breakpoint
4 CPU overflow trap
5 BIOS print screen
6 CPU Invalid opcode (186,286,386)
7 CPU coprocessor not available (286,386)
8 IRQ0 ~timer~ (55ms intervals, 18.21590 per second)
9 IRQ1 keyboard service required (see ~INT 9~)
A IRQ2 slave ~8259~ or EGA/VGA vertical retrace
B IRQ3 COM2 service required (PS/2 MCA COM3-COM8)
C IRQ4 COM1 service required
D IRQ5 fixed disk or data request from LPT2
E IRQ6 floppy disk service required
F IRQ7 data request from LPT1 (unreliable on IBM mono)
10 BIOS video (see ~INT 10~)
11 BIOS Equipment determination (see ~INT 11~)
12 BIOS memory size (see ~INT 12~)
13 BIOS disk I/O service (see ~INT 13~)
14 BIOS serial communications (see ~INT 14~)
15 BIOS system services, cassette (see ~INT 15~)
16 BIOS keyboard services (see ~INT 16~)
17 BIOS parallel printer (see ~INT 17~)
18 BIOS ROM BASIC loader
19 BIOS bootstrap loader (unreliable, see ~INT 19~)
1A BIOS time of day (see ~INT 1A~)
1B BIOS user defined ctrl-break handler (see ~INT 1B~)
1C BIOS user defined clock tick handler (see ~INT 1C~)
1D BIOS ~6845~ video parameter pointer
1E BIOS diskette parameter pointer (base table)
1F BIOS graphics character table
20 DOS general program termination
21 DOS function request services (see ~INT 21~)
22 DOS terminate address (see ~INT 22~)
23 DOS control break termination address (see ~INT 23~)
24 DOS critical error handler (see ~INT 24~)
25 DOS absolute disk read (see ~INT 25~)
26 DOS absolute disk write (see ~INT 26~)
27 DOS terminate and stay resident (see ~INT 27~)
28 DOS idle loop, issued by DOS when idle (see ~INT 28~)
29 DOS fast TTY console I/O (see ~INT 29~)
2A DOS critical section and NETBIOS (see ~INT 2A~)
2B DOS internal, simple ~IRET~ in DOS 2.0-5.0
2C DOS internal, simple IRET in DOS 2.0-5.0
2D DOS internal, simple IRET in DOS 2.0-5.0
2E DOS exec command from base level command
interpreter (see ~INT 2E~)
2F DOS multiplexer (see ~INT 2F~)
30-31 CPM far jump vector for CPM (not an interrupt)
31 DPMI DOS Protected Mode Interface (for DOS extenders)
32 reserved
33 mouse support (see ~INT 33~)
34-3E Microsoft/Borland floating point emulation
3F overlay manager
40 BIOS hard disk
41 BIOS fixed disk 0 parameters pointer (see ~INT 13,9~)
42 BIOS relocated video handler (EGA/VGA/PS)
43 BIOS user font table (EGA/VGA/PS)
44 BIOS first 128 graphics characters (also Netware)
45 BIOS reserved for BIOS
46 BIOS fixed disk 1 parameters ptr (see ~INT 13,9~/INT 41)
47 BIOS reserved for BIOS
48 BIOS PCjr cordless keyboard translation
49 BIOS PCjr non-keyboard scancode translation table
4A BIOS user alarm (AT,CONV,PS/2) (see ~INT 4A~)
4B-4F BIOS reserved
50 BIOS periodic alarm from timer (PS/2)
51-58 BIOS reserved
59 BIOS GSS Computer Graphics Interface
5A BIOS cluster adapter BIOS entry point
5B BIOS cluster adapter boot
5C NETBIOS NETBIOS interface, TOPS interface
5D-5F BIOS reserved for BIOS
60-67 reserved for user software interrupts
67 EMS LIM/EMS specification (see ~INT 67~)
68 APPC
69-6B reserved by IBM
6C DOS DOS 3.2 real time clock update
BIOS system resume vector
6D-6F reserved
70 IRQ8 real time clock (AT,XT286,PS50+, see ~INT 15~)
71 IRQ9 software redirected to IRQ2 (AT,XT286,PS50+)
72 IRQ10 reserved (AT,XT286,PS50+)
73 IRQ11 reserved (AT,XT286,PS50+)
74 IRQ12 mouse interrupt (PS50+)
75 IRQ13 numeric coprocessor NMI error (AT,XT286,PS50+)
76 IRQ14 fixed disk controller (AT,XT286,PS50+)
77 IRQ15 reserved (AT,XT286,PS50+)
78-79 unused
80-85 ROM BASIC
86-F0 DOS reserved for BASIC interpreter use
86 NETBIOS NETBIOS relocated INT 18
E0 CPM CP/M 86 function calls
F1-FF reserved by IBM
FE-FF may be destroyed by return from protected
mode using VDISK on 286 machines (Apr 86, DDJ)
- Intel defined 0 through 20h for use for internal CPU; IBM
redefined interrupts 0 through 1Fh for its own use, hence
the duplicate definitions in the tables
- all interrupts except the internal CPU exceptions push the
flags and the CS:IP of the next instruction onto the stack.
CPU exception interrupts are similar but push the CS:IP of the
causal instruction. 8086/88 divide exceptions are different,
they return to the instruction following the division
- interrupts are disabled upon entry into any interrupt routine and
should be enabled by the user or by an ~IRET~
- in DOS 3.2+ hardware IRQ interrupts are re-vectored through DOS
to provide standard stack frames
:int 5
^INT 5 - Print Screen
no input data
% related memory:
50:00 = 00 Print screen has not been called, or upon return
from a call there were no errors
= 01 Print screen is already in progress
= FF Error encountered during printing
- invoked from ~INT 9~
:int 8:BIOS timer interrupt
^INT 8 - System timer
no input data
% related memory:
40:6C = Daily timer counter (4 bytes)
40:70 = 24 hr overflow flag (1 byte)
40:67 = Day counter on all products after AT
40:40 = Motor shutoff counter - decremented until 0 then
shuts off diskette motor
- ~INT 1C~ is invoked as a user interrupt
- the byte at 40:70 is a flag that certain DOS functions use
and adjust the date if necessary. Since this is a flag and
not a counter it results in DOS (not the ~RTC~) losing days
when several midnights pass before a DOS call
- generated 18.2 times per second by the ~8253~ Programmable Interval
Timer (PIT)
- normal INT 8 execution takes approximately 100 microseconds
- see ~8253~
:int 9:keyboard interrupt
^INT 9 - Keyboard Interrupt (Hardware Handler)
no input data
% related memory:
40:17 = updates keyboard flag byte 0
40:18 = updates keyboard flag byte 1
40:1A = queue head ptr is set to buffer start if Ctrl-Break is hit
40:1C = updates buffer tail pointer for each keystroke; sets
queue tail ptr is set to queue start if Ctrl-Break is hit
40:1E = updates keyboard buffer (32 bytes)
40:71 = updates bit 7 of the BIOS break flag if Ctrl-Break is hit
40:72 = updates reset flag with 1234H if Ctrl-Alt-Del pressed
40:96 = indicates keyboard type (AT,PS/2)
40:97 = updates keyboard LED flags (AT,PS/2)
FFFF:0 = reboot code called if Ctrl-Alt-Del pressed
% related interrupts:
~INT 5~ invoked if print screen key pressed
~INT 1B~ invoked if Ctrl-Break key sequence pressed
~INT 15,85~ invoked on AT if system request key is pressed
~INT 15,4F~ invoked on machines after PC/AT with AL = scan code
- records key press and key release via IRQ1/8259 and
stores scan codes in the BIOS buffer located at 40:1C
- keyboard controllers also buffer data when interrupts are
disabled at the ~8259~ interrupt controller
- keyboard controller is capable of storing 16 keystrokes
even when interrupts are disabled at the 8259
- normal INT 9 execution takes approximately 500 microseconds;
at least one standard XT BIOS is known to take up to 1.3
milliseconds to execute
- see ~MAKE CODES~ ~KB FLAGS~
:int 10:BIOS video services:video interrupt
^INT 10 - Video BIOS Services
% For more information, see the following topics:
~INT 10,0~ - Set video mode
~INT 10,1~ - Set cursor type
~INT 10,2~ - Set cursor position
~INT 10,3~ - Read cursor position
~INT 10,4~ - Read light pen
~INT 10,5~ - Select active display page
~INT 10,6~ - Scroll active page up
~INT 10,7~ - Scroll active page down
~INT 10,8~ - Read character and attribute at cursor
~INT 10,9~ - Write character and attribute at cursor
~INT 10,A~ - Write character at current cursor
~INT 10,B~ - Set color palette
~INT 10,C~ - Write graphics pixel at coordinate
~INT 10,D~ - Read graphics pixel at coordinate
~INT 10,E~ - Write text in teletype mode
~INT 10,F~ - Get current video state
~INT 10,10~ - Set/get palette registers (EGA/VGA)
~INT 10,11~ - Character generator routine (EGA/VGA)
~INT 10,12~ - Video subsystem configuration (EGA/VGA)
~INT 10,13~ - Write string (BIOS after 1/10/86)
~INT 10,14~ - Load LCD char font (convertible)
~INT 10,15~ - Return physical display parms (convertible)
~INT 10,1A~ - Video Display Combination (VGA)
~INT 10,1B~ - Video BIOS Functionality/State Information (MCGA/VGA)
~INT 10,1C~ - Save/Restore Video State (VGA only)
~INT 10,FE~ - Get DESQView/TopView Virtual Screen Regen Buffer
~INT 10,FF~ - Update DESQView/TopView Virtual Screen Regen Buffer
Warning: Some BIOS implementations have a bug that causes register
BP to be destroyed. It is advisable to save BP before a call to
Video BIOS routines on these systems.
- registers CS, DS, ES, SS, BX, CX, DX are preserved unless
explicitly changed
- see ~INT 1F~ ~INT 1D~ ~INT 29~ ~INT 21,2~ ~INT 21,6~ ~INT 21,9~
:int 10,0:video modes
^INT 10,0 - Set Video Mode
AH = 00
AL = 00 40x25 B/W text (CGA,EGA,MCGA,VGA)
= 01 40x25 16 color text (CGA,EGA,MCGA,VGA)
= 02 80x25 16 shades of gray text (CGA,EGA,MCGA,VGA)
= 03 80x25 16 color text (CGA,EGA,MCGA,VGA)
= 04 320x200 4 color graphics (CGA,EGA,MCGA,VGA)
= 05 320x200 4 color graphics (CGA,EGA,MCGA,VGA)
= 06 640x200 B/W graphics (CGA,EGA,MCGA,VGA)
= 07 80x25 Monochrome text (MDA,HERC,EGA,VGA)
= 08 160x200 16 color graphics (PCjr)
= 09 320x200 16 color graphics (PCjr)
= 0A 640x200 4 color graphics (PCjr)
= 0B Reserved (EGA BIOS function 11)
= 0C Reserved (EGA BIOS function 11)
= 0D 320x200 16 color graphics (EGA,VGA)
= 0E 640x200 16 color graphics (EGA,VGA)
= 0F 640x350 Monochrome graphics (EGA,VGA)
= 10 640x350 16 color graphics (EGA or VGA with 128K)
640x350 4 color graphics (64K EGA)
= 11 640x480 B/W graphics (MCGA,VGA)
= 12 640x480 16 color graphics (VGA)
= 13 320x200 256 color graphics (MCGA,VGA)
= 8x EGA, MCGA or VGA ignore bit 7, see below
= 9x EGA, MCGA or VGA ignore bit 7, see below
- if AL bit 7=1, prevents EGA,MCGA & VGA from clearing display
- function updates byte at 40:49; bit 7 of byte 40:87
(EGA/VGA Display Data Area) is set to the value of AL bit 7
:int 10,1
^INT 10,1 - Set Cursor Type
AH = 01
CH = cursor starting scan line (cursor top) (low order 5 bits)
CL = cursor ending scan line (cursor bottom) (low order 5 bits)
returns nothing
- cursor scan lines are zero based
- cursor size can also be set via the ~6845~ CRT controller
- cursor size can be determined using the CRTC, ~INT 10,3~ or the
~BIOS Data Area~ bytes 40:60 (ending scan line) and 40:61 (starting
scan line)
- the following is a list of the cursor scan lines associated with
most common adapters; screen sizes over 40 lines may differ
depending on adapters.
% Line Starting Ending Character
% Video Count Scan Line Scan Line Point Size
CGA 25 06 07 08
MDA 25 0B 0C 0E
EGA 25 06 07 0E
EGA 43 04/06 07 08
VGA 25 0D 0E 10
VGA 40 08 09 0A
VGA 50 06 07 08
- use CX = 2000h to disable cursor
:int 10,2
^INT 10,2 - Set Cursor Position
AH = 02
BH = page number (0 for graphics modes)
DH = row
DL = column
returns nothing
- positions relative to 0,0 origin
- 80x25 uses coordinates 0,0 to 24,79; 40x25 uses 0,0 to 24,39
- the ~6845~ can also be used to perform this function
- setting the data in the BIOS Data Area at location 40:50 does not
take immediate effect and is not recommended
- see ~VIDEO PAGES~ ~6845~ ~BDA~
:int 10,3
^INT 10,3 - Read Cursor Position and Size
AH = 03
BH = video page
on return:
CH = cursor starting scan line (low order 5 bits)
CL = cursor ending scan line (low order 5 bits)
DH = row
DL = column
- returns data from ~BIOS DATA AREA~ locations 40:50, 40:60 and 40:61
- the ~6845~ can also be used to read the cursor position
- the return data can be circumvented by direct port I/O to the 6845
CRT Controller since this function returns the data found in the
BIOS Data Area without actually checking the controller
:int 10,4
^INT 10,4 - Read Light Pen Position
AH = 04
on return:
AH = 0 light pen switch not triggered
= 1 light pen triggered
BX = pixel column (0-319 or 0-639, mode dependent)
CH = raster line (0-199) (CGA and EGA modes 4, 5 and 6)
CX = raster line (EGA modes except 4, 5 and 6)
DH = row (0-24)
DL = column (0-79 or 0-79 mode dependent)
- data returned as a byte coordinate, leaving horizontal
accuracy to within 2 pixels (320) or 4 pixels (640)
- vertical accuracy within 2 lines
- PS/2's don't support the light pen interface
:int 10,5
^INT 10,5 - Select Active Display Page
AH = 05
AL = new page number, see ~VIDEO PAGES~
for PCjr only:
AL = 80h to read CRT/CPU page registers
81h to set CPU page register
BL = CPU page register
82h to set CRT page register
BH = CRT page register
83h to set CPU and page registers
BH = CRT page register
BL = CPU page register
on return: (PCjr only)
BH = CRT page register
BL = CPU page register
:int 10,6
^INT 10,6 - Scroll Window Up
AH = 06
AL = number of lines to scroll, previous lines are
blanked, if 0 or AL > screen size, window is blanked
BH = attribute to be used on blank line
CH = row of upper left corner of scroll window
CL = column of upper left corner of scroll window
DH = row of lower right corner of scroll window
DL = column of lower right corner of scroll window
returns nothing
- in video mode 4 (300x200 4 color) on the EGA, MCGA and VGA
this function scrolls page 0 regardless of the current page
- can be used to scroll graphics screens, using character coords
- on CGA's this function disables video adapter, causing flitter
:int 10,7
^INT 10,7 - Scroll Window Down
AH = 07
AL = number of lines to scroll, previous lines are
blanked, if 0 or AL > screen size, window is blanked
BH = attribute to be used on blank line
CH = row of upper left corner of scroll window
CL = column of upper left corner of scroll window
DH = row of lower right corner of scroll window
DL = column of lower right corner of scroll window
returns nothing
- in video mode 4 (300x200 4 color) on the EGA, MCGA and VGA
this function scrolls page 0 regardless of the current page
- can be used to scroll graphics screens, using character coords
- on CGA's this function disables video adapter, causing flitter
:int 10,8
^INT 10,8 - Read Character and Attribute at Cursor Position
AH = 08
BH = display page
on return:
AH = attribute of character (alpha modes only)
AL = character at cursor position
- in video mode 4 (300x200 4 color) on the EGA, MCGA and VGA
this function works only on page zero
:int 10,9
^INT 10,9 - Write Character and Attribute at Cursor Position
AH = 09
AL = ASCII character to write
BH = display page (or mode 13h, background pixel value)
BL = character attribute (text) foreground color (graphics)
CX = count of characters to write (CX >= 1)
returns nothing
- does not move the cursor
- in graphics mode (except mode 13h), if BL bit 7=1 then
value of BL is XOR'ed with the background color
:int 10,a
^INT 10,A - Write Character Only at Current Cursor Position
AH = 0A
AL = ASCII character to write
BH = display page (or mode 13h, background pixel value)
BL = foreground color (graphics mode only)
CX = count of characters to write (CX >= 1)
return nothing
- similar to ~INT 10,9~ except color ignored in text modes
:int 10,b
^INT 10,B - Set Color Palette
AH = 0B
BH = palette color ID
= 0 to set background and border color
= 1 to select 4 color palette
BL = color value (when BH = 0)
= palette value (when BH = 1)
Palette Pixel Color
0 0 current background color
1 green (2)
2 red (4)
3 brown (6)
1 0 current background color
1 cyan (3)
2 magenta (5)
3 white (7)
- does not work for all EGA and VGA video modes
- sets border color in text mode (BH = 0)
:int 10,c
^INT 10,C - Write Graphics Pixel at Coordinate
AH = 0C
AL = color value (XOR'ED with current pixel if bit 7=1)
BH = page number, see ~VIDEO PAGES~
CX = column number (zero based)
DX = row number (zero based)
returns nothing
- if bit 7 is 1, color specified is XOR'ed with current pixel
- page number in BH ignored for 320x200 4 color graphics mode
- this function is known to destroy AX and possibly SI and DI on
on some PS/2 VGA systems
:int 10,d
^INT 10,D - Read Graphics Pixel at Coordinate
AH = 0D
BH = page number, see ~VIDEO PAGES~
CX = column number (zero based)
DX = row number (zero based)
on return:
AL = color of pixel read
- 64K IBM EGAs with BIOS dated 9/13/84 in 350 line video
modes, return invalid data in AL
- page number in BH ignored for 320x200 4 color graphics mode
:int 10,e
^INT 10,E - Write Text in Teletype Mode
AH = 0E
AL = ASCII character to write
BH = page number (text modes)
BL = foreground pixel color (graphics modes)
returns nothing
- cursor advances after write
- characters BEL (7), BS (8), LF (A), and CR (D) are
treated as control codes
- for some older BIOS (10/19/81), the BH register must point
to the currently displayed page
- on CGA adapters this function can disable the video signal while
performing the output which causes flitter.
:int 10,f
^INT 10,F - Get Video State
AH = 0F
on return:
AH = number of screen columns
AL = mode currently set (see ~VIDEO MODES~)
BH = current display page
- video modes greater than 13h on EGA, MCGA and VGA indicate
~INT 10,0~ was called with the high bit of the mode (AL) set
to 1, meaning the display does not need cleared
- function returns byte value at 40:49; On EGA, MCGA and
VGA bit 7 of register AL is determined by bit 7 of BIOS Data
Area byte 40:87. This bit is usually set by INT 10,0
with bit 7 of the requested mode (in AL) set to 1
:int 10,10
^INT 10,10 - Set/Get Palette Registers (EGA/VGA)
AH = 10h
% AL = 00 set individual palette register
BH = color value
BL = palette register
% AL = 01 set border color (overscan register)
BH = color value
% AL = 02 set all palette registers and border
ES:DX = pointer to 17 byte table representing 16 palette
registers and border color register
% AL = 03 toggle intensity/blinking (EGA)
BL = 0 enable intensity
1 enable blinking
% AL = 07 read palette register (PS/2)
BL = palette register to read (0-15)
on return:
BH = value of palette register
% AL = 08 read border color (overscan register, PS/2)
on return:
BH = value of border color (overscan register)
% AL = 09 read palette registers and border (PS/2)
ES:DX = pointer to 17 byte table representing 16 palette
registers and border color register
on return:
ES:DX = pointer to table provided as input
% AL = 10 set DAC color register
BX = color register to set
CH = green value
CL = blue value
DH = red value
% AL = 12 set block of DAC color registers
BX = first color register to set
CX = number of color registers to set
ES:DX = pointer to table of color values to set
% AL = 13 set attribute controller color select state
BL = 0 set Mode Control register bit 7
BH = value for bit 7
BL = 1 set color select register
BH = value for color select register
% AL = 15 read DAC color register (PS/2)
BX = color register to read
on return:
CH = green value
CL = blue value
DH = red value
% AL = 17 read block of DAC color registers
BX = first color register to read
CX = number of color registers to read
ES:DX = pointer to buffer for color registers
on return:
ES:DX = pointer to color table provided as input
% AL = 18 update video DAC mask register
BL = new mask
% AL = 19 read video DAC mask register
on return:
BL = value read from video DAC mask register
% AL = 1A read color page state
BL = bit 7 of Mode Control Register
BH = bits 2 thru 3 of Color select register if BL = 0
= bits 0 thru 3 of Color select register if BL = 1
on return:
BL = current paging mode
CX = current page
% AL = 1B sum color values to shades of gray
BX = first color register to sum
CX = number of color registers to sum
- controls the pixel color mapping bit values
- BIOS extension to EGA/VGA systems
:int 10,11
^INT 10,11 - Character Generator Routine (EGA/VGA)
AH = 11h
% AL = 00 user character load
BH = number of bytes per character
BL = table in character generator RAM
CX = count of characters in table
DX = ASCII code of first character defined
ES:BP = pointer to user table
% AL = 01 ROM BIOS 8x14 monochrome set
BL = table in character generator RAM
% AL = 02 ROM BIOS 8x8 double dot
BL = table in character generator RAM
% AL = 03 set displayed definition table
BL = value for character Map Select register (EGA,VGA)
= character generator RAM table numbers (MCGA)
% AL = 04 ROM BIOS 8x16 character set
BL = table in character generator RAM
% AL = 10 user specified character definition table
BH = bytes per character (points)
BL = table in character generator RAM
CX = number of characters defined in table
DX = ASCII code of first character defined
ES:BP = pointer to user table
% AL = 11 ROM BIOS 8x14 monochrome character set
BL = table in character generator RAM
% AL = 12 ROM 8x8 double dot character definitions
BL = table in character generator RAM
% AL = 14 ROM 8x16 double dot character definitions
BL = table in character generator RAM
% AL = 20 pointer to graphics character table for ~INT 1F~ (8x8)
ES:BP = pointer to user table
% AL = 21 user graphics character pointer at INT 43
BL = row specifier
= 0 - user specified (DL = rows)
= 1 is 14 rows
= 2 is 25 rows
= 3 is 43 rows
CX = bytes per character (points)
DL = rows (when BL = 0)
ES:BP = pointer to user table
% AL = 22 ROM 8x14 character set
BL = number of rows (see AL=21)
DL = rows (when BL = 0)
% AL = 23 ROM 8x8 double dot character set
BL = row specifier (see AL=21)
DL = rows (when BL = 0)
% AL = 24 ROM 8x16 character set
BL = row specifier (see AL=21)
DL = rows (when BL = 0)
% AL = 30 get current character generator information
BH = information desired:
= 0 ~INT 1F~ pointer
= 1 INT 44h pointer
= 2 ROM 8x14 pointer
= 3 ROM 8x8 double dot pointer (base)
= 4 ROM 8x8 double dot pointer (top)
= 5 ROM 9x14 alpha alternate pointer
= 6 ROM 8x16 character table pointer
= 7 ROM 9x16 alternate character table pointer
on return:
CX = bytes per character (points)
DL = rows (less 1)
ES:BP = pointer to table
:int 10,12
^INT 10,12 - Video Subsystem Configuration (EGA/VGA)
AH = 12h
% BL = 10 return video configuration information
on return:
BH = 0 if color mode in effect
= 1 if mono mode in effect
BL = 0 if 64k EGA memory
= 1 if 128k EGA memory
= 2 if 192k EGA memory
= 3 if 256k EGA memory
CH = feature bits
CL = switch settings
% BL = 20 select alternate print screen routine
% BL = 30 select scan lines for alphanumeric modes
AL = 0 200 scan lines
= 1 350 scan lines
= 2 400 scan lines
on return:
AL = 12
% BL = 31 select default palette loading
AL = 0 enable default palette loading
= 1 disable default palette loading
on return:
AL = 12
% BL = 32 CPU access to video RAM
AL = 0 enable CPU access to video RAM and I/O ports
= 1 disable CPU access to video RAM and I/O ports
on return:
AL = 12
% BL = 33 Gray scale summing
AL = 0 enable gray scale summing
= 2 disable gray scale summing
on return:
AL = 12
% BL = 34 cursor emulation
AL = 0 enable cursor emulation
= 1 disable cursor emulation
on return:
AL = 12
% BL = 35 PS/2 video display switching
AL = 0 initial adapter video off
= 1 initial planar video on
= 2 switch active video off
= 3 switch inactive video on
ES:DX pointer to 128 byte save area (when AL = 0, 2 or 3)
on return:
AL = 12
% BL = 36 video refresh control
AL = 0 enable refresh
= 1 disable refresh
on return:
AL = 12
:int 10,13
^INT 10,13 - Write String (BIOS versions from 1/10/86)
AH = 13h
AL = write mode (see bit settings below)
= 0 string is chars only, attribute in BL, cursor not moved
= 1 string is chard only, attribute in BL, cursor moved
= 2 string contains chars and attributes, cursor not moved
= 3 string contains chars and attributes, cursor moved
BH = video page number
BL = attribute if mode 0 or 1 (AL bit 1=0)
CX = length of string (ignoring attributes)
DH = row coordinate
DL = column coordinate
ES:BP = pointer to string
Bit settings for write mode (register AL):
³7³6³5³4³3³2³1³0³ AL
³ ³ ³ ³ ³ ³ ³ ÀÄÄÄÄ 0=don't move cursor, 1=move cursor
³ ³ ³ ³ ³ ³ ÀÄÄÄÄÄ 0=BL has attributes, 1=string has attributes
ÀÄÁÄÁÄÁÄÁÄÁÄÄÄÄÄÄ unused
returns nothing
- BEL, BS, CR, LF are treated as ASCII control codes
- wraps data and scrolls if unable to fit data on one line
:int 10,14
^INT 10,14 - Load LCD Character Font (convertible only)
AH = 14h
% AL = 0 - load user specified font
ES:DI = pointer to character font
CX = number of characters to store
DX = char offset into ram font area
BH = number of bytes per character
BL = 0 load main font (block 0)
= 1 load alternate font (block 1)
% AL = 1 - load system ROM default font
BL = 0 load main font (block 0)
= 1 load alternate font (block 1)
% AL = 2 - set mapping of LCD high intensity attribute
BL = 0 ignore high intensity attribute
= 1 map high intensity to underscore
= 2 map high intensity to reverse video
= 3 map high intensity to select alternate font
:int 10,15
^INT 10,15 - Return Physical Display Parms (convertible)
AH = 15h
on return:
AX = alternate display adapter type
ES:DI = pointer to parameter table:
% Offset Size Description
01 word monitor model number
02 word vertical pels per meter
03 word horizontal pels per meter
04 word total number of vertical pels
05 word total number of horizontal pels
06 word horizontal pel separation in micrometers
07 word vertical pel separation in micrometers
:int 10,1a
^INT 10,1A - Video Display Combination (VGA)
AH = 1A
AL = 00 get video display combination
= 01 set video display combination
BL = active display (see table below)