free hit counter

IBM XT 5160 Technical Reference page 225

Hide thumbs Also See for XT 5160:
Table of Contents

Advertisement

IBM Personal Computer MACRO Assembler
Version 2.00
VIDEO ---- 01/10/86
VIDEO DISPLAY BIOS
1-11
01-10-86
TR I GGER HAS BEEN SET, READ THE VALUE IN
:
-----
-
-
-----------
- --- - -----
---
--
----- -
----
---
- -
------ -
---
--------
- -
----
; LIGHT PEN
TH I S ROUT I NE TESTS THE LIGHT PEN SW I TCH AND THE LIGHT
PEN TR I GGER •
I F BOTH ARE SET, THE LOCAT I ON OF THE LIGHT
PEN I S DETERM I NED. OTHERW I SE , A RETURN WITH NO I NFORMAT I ON
I S MADE.
; ON EXIT:
;
(AH)
=
0 IF NO LIGHT PEN INFORMATION IS AVAILABLE
;
BX,CX,DX ARE DESTROYED
( AH)
=
1 I F LIGHT PEN I S AVA I LABLE
( DH ,DL )
=
ROW, COLUMN OF CURRENT LIGHT PEN POS I T I ON
(CH)
=
RASTER POS I TI ON
;
(BX)
=
BEST GUESS AT PIXEL HORIZONTAL POSITION
MOV
AL, OCRT_MODE
; GET THE CURRENT MODE
CMP
AL,4
JC
U2
; READ-CURSOR
CMP
AL,1
MOV
BH,O
FILL WITH BACKGROUND
JNE
U3
SCROLL-UP
U2:
READ-CURSOR
MOV
AH,08H
GET READ CURSOR COMMAND
INT
10H
READ CHAR/ATTR AT CURRENT CURSOR
MOV
BH,AH
STORE IN BH
U3:
SCROLL-UP
MOV
AX, 060 I H
SCROLL ONE LINE
SUB
CX,CX
UPPER LEFT CORNER
MOV
DH,25-1
LOWER RIGHT ROW
MOV
DL,BYTE PTR OCRT_COLS
LOWER RIGHT COLUMN
DEC
DL
U4:
V IDEO-CALL -RETURN
INT
10H
SCROLL UP THE SCREEN
U5:
TTY-RETURN
XCHG
AX,DI
RESTORE THE ENTRY CHARACTER FROM (Oil
JMP
V IDEO_RETURN
RETURN TO CALLER
U6:
SET-CURSOR-INC
INC
DH
NEXT ROW
U1:
SET-CURSOR
MOV
AH,02H
JMP
U4
ESTABLISH THE NEW CURSOR
WA I T FOR LI GHT PEN TO BE DEPRESSED
MOVE TO FIRST COLUMN
SET_CURSOR
TEST LIGHT PEN TR I GGER
RETURN WITHOUT RESETT I NG TR I GGER
o
I V I SOR FOR 896 HZ TONE
SET COUNT FOR 3 1 /64 SECOND FOR BEEP
SOUND THE POD BELL
TTY_RETURN
; LIGHT PEN REG I STERS ON 6845
ADDRESS REG I STER FOR 6845
REG I STER TO READ
SET IT UP
;
I/O DELAY
; DATA REGISTER
; GET THE VALUE
; SAVE IN CX
; BOTTOM OF SCREEN
; YES, SCROLL THE SCREEN
; NO, JUST SET THE CURSOR
; SET NO LIGHT PEN RETURN CODE
; GET BASE ADDRESS OF 6845
; POINT TO STATUS REGISTER
; GET STATUS REGI STER
; TEST LI GHT PEN SW ITCH
; GO IF YES
; NOT SET, RETURN
;
IS IT ALREADY AT START OF LINE
;
SET CURSOR
; NO
-='-
JUST MOVE IT BACK
; SET_CURSOR
; SUBTRACT_TABLE
; WAS I T A CARR I AGE RETURN
;
I SIT ALINE FEED
; GO TO LINE FEED
;
I S IT A BELL
; GO TO BELL
;
I SIT A BACKSPACE
;
I F NOT A CONTROL, 0 I SPLA Y I T
AH,I6
AL,2
V1A
V1
PROC
NEAR
AH,O
DX,OADDR 6845
DX,6
-
AL,DX
AL,004H
V6 A
V6-
DH,25-1
U6
Ul
OX
AL,DX
CH,AL
CX,1331
BL,31
BEEP
U5
ENDP
DL,O
U1
DL,DL
U1
OX
U1
DX,OADDR 6845
AL,AH
-
DX,AL
U9
AL,LF
UIO
AL,01H
Ull
AL,08H
UO
INPUT REGISTERS POINTED TO BY AH, AND CONVERT TO ROW COLUMN IN (OX)
CMP
JNE
JMP
ASSUME
DS:DATA
DB
3,3,5,5,3,3,3,4
JE
CMP
JE
CMP
JE
CMP
JNE
CHECK FOR CONTROL CHARACTERS
MOV
OR
JE
DEC
JMP
BELL FOUND
LINE FEED FOUND
MOV
MOV
OUT
NOP
INC
IN
MOV
BACK SPACE FOUND
MOV
JMP
VI
V6_A:
TEST
JNZ
JMP
V1A:
MOV
MOV
CALL
JMP
WRITE_TTY
;-----
NOW TEST FOR LIGHT PEN TRIGGER
UII:
READ LPEN
-
MOV
MOV
ADD
IN
TEST
JZ
JMP
UIO:
; - - - - -
CARR I AGE RETURN FOUND
U9:
U8:
1181 0121 AO 0049 R
1188 012A 3C 04
1189 012C 12 06
1190 012E 3C 01
1191 0130 B1 00
1192 0132 15 06
1193 0134
1794 0134 B4 08
1195 0136 CD 10
1196 0138 8A FC
1191 013A
1198 013A B8 060 I
1199 0130 2B C9
1800 013F B6 18
1801 0141 8A 16 004A R
1802 0145 FE CA
1803 0141
1804 0141 CD 10
1805 0149
1806 0149 91
1801 014A E9 0130 R
1808
1809 0140
I 8 10 0140 FE C6
1811 014F
I 8 I 2 014F B4 02
I 8 I 3 015 I EB F 4
1814
1815
1816 0153
1811 0153 14 13
1818 0155 3C OA
1819 0151 14 13
1820 0159 3C 01
1821 015B 14 16
1822 0150 3C 08
1823 015F 15 AC
1824
1825
1826
1821 0161
OA 02
1828 0163 14 EA
1829 0165 4A
1830 0166 EB E1
1831
1832
1833
1834 0168
1835 0168 B2 00
1836 016A EB E3
1831
1838
1839
1840 016C
1841 016C 80 FE 18
1842 016F 15 DC
I 843 0111 EB BO
1844
1845
1846
1841 0113
1848 0113 B9 0533
1849 0116 B3 IF
1850 0118 E8 0000 E
I 85 I 011B EB CC
1852 0110
1853
1854
1855
1856
1851
1858
1859
1860
1861
1862
1863
1864
1865
1866
1861
1868 0110 03 03 05 05 03 03
1869
03 04
1810
1811
1812 0185
1813 0185 B4 00
1814 0181 8B 16 0063 R
1815 018B 83 C2 06
1816 018E EC
1811 018F A8 04
1818 0191
14 03
1819 0193 E9 0816 R
1880
1881
1882
1883 0196 A8 02
1884 0198 15 03
1885 019A E9 0820 R
1886
1881
1888
1889 0190
1890 0190 B4 10
1891
1892
1893
1894 019F 8B 16 0063 R
1895 01A3 8A C4
1896 01A5 EE
1891 01A6 90
1898 01A1 42
1899 01A8 EC
1900 01A9 8A E8
5-78
VIDEO (01/10/86)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents