free hit counter

IBM XT 5160 Technical Reference page 216

Hide thumbs Also See for XT 5160:
Table of Contents

Advertisement

WA I T FOR HOR I ZONTAL RETRACE OR VERTI CAL RETRACE I F COLOR 80
PAGE
;-----
IF
AMOUNT OF LINES TO BE SCROLLED: AMOUNT OF LINES IN WINDOW
THEN
ADJUST AL; ELSE
RETURN;
TEST_L I NE_COUNT PROC
NEAR
:
-
~~~~
-
~~
-
~~~~~~~
------------
-
---------------
-
------
--
------
--
---
-
---
----
--
--
-
--
;
-
TH I S ROUT I NE READS THE ATTR I BUTE AND CHARACTER AT THE CURRENT
;
CURSOR POS I T I ON AND RETURNS THEM TO THE CALLER
INPUT
( AH)
:
CURRENT CRT MODE
;
(BH)
:
DISPLAY PAGE ( ALPHA MODES ONLY)
(OS)
:
DATA SEGMENT
( ES)
:
REGEN SEGMENT
; OUTPUT
( AL ) :
CHARACTER READ
(AH)
:
ATTRIBUTE READ
;
----
---
~~~~~~- -~~~~~ ~~: ~~~~~ ~~
-
--------
-
-
--
----- -
----
---- --- --
--------------
-
--
5-69
ELSE SET BUFFER START ADDRESS TO ZERO
ADD LENGTH OF BUFFER FOR ONE PAGE
DECREMENT PAGE COUNT
LOOP TILL PAGE COUNT EXHAUSTED
DETERMINE LOCATION IN REGEN IN PAGE
GET COLUMNS PER ROW COUNT
DETERM I NE BYTES TO ROW
ADD I N COLUMN VALUE
• 2 FOR ATTR I BUTE BYTES
ADD LOCATION TO START OF REGEN PAGE
GET BASE ADDRESS OF ACTIVE DISPLAY
OX: STATUS PORT ADDRESS· OF ADAPTER
BP: ATTR I BUTE / CHARACTER
(FROM BL / AL)
01: POS I T I ON (OFFSET I N REGEN BUFFER)
BL: MODE FLAG (ZERO FOR 80X25 COLOR)
;
IS THIS GRAPHICS
;
I S TH I S BW CARD
SAVE LI NE COUNT IN BL
TEST IF AL I S ALREADY ZERO
I FIT I S THEN RETURN •••
SAVE AX
SUBTRACT LOWER ROW FROM UPPER ROW
ADJUST 0 I FFERENCE BY 1
LINE COUNT :
AMOUNT OF ROWS IN WINDOW?
RESTORE AX
I F NOT THEN WE'RE ALL SET
OTHERW I SE SET BL TO ZERO
; RETURN
;
READ AC CONT I NUE
; GET REGEN LOCATION AND PORT ADDRESS
; ESTABLISH ADDRESSING IN SI
; GET REGEN SEGMENT FOR QU I CK ACCESS
1-8
01-10-86
VIDEO (01/10/86)
NEAR
NEAR
BL,AL
AL,AL
BL SET
AX-
AL,DH
AL,CH
AL
AL,BL
AX
BL SET
BL-;"BL
01,01
PROC
AH,BL
BP,AX
BL,2
BL,I
AL,BH
SETUP FOR BUFFER READ OR WR I TE
SWAP MODE TYPE WITH ATTR I BUTE
SAVE CHARACTER/ATTR
IN (BP) REGISTER
CONVERT 0 I SPLA Y MODE TYPE TO A
ZERO VALUE FOR COLOR IN 80 COLUMN
MOVE 01 SPLAY PAGE TO LOW BYTE
; CLEAR HIGH BYTE FOR BYTE OFFSET
01 ,AX
; MOVE 0 I SPLA Y PAGE (COUNT)
TO WORK REG
01, I
;
TIMES 2 FOR WORD OFFSET
DX,[DI+OFFSET OCURSOR POSN)
; GET ROW/COLUMN OF THAT PAGE
P21
-
SK I P BUFFER ADJUSTMENT I F PAGE ZERO
MOV
OR
JZ
PUSH
MOV
SUB
INC
CMP
POP
JNE
SUB
ADD
0 I ,OCRT LEN
DEC
AX
-
JNZ
P20
RET
TEST_LI NE_COUNT ENDP
OR
BL,BL
CHECK MODE FLAG FOR COLOR CARD IN 80
JNZ
P13
ELSE SKIP RETRACE WAIT -
DO FAST READ
Pll :
WA I T FOR HORZ RETRACE LOW OR VERT I CAL
STI
ENABLE INTERRUPTS FIRST
NOP
ALLOW FOR SMALL INTERRUPT WINDOW
CLI
BLOCK I NTERRUPTS FOR SINGLE LOOP
IN
AL,DX
GET STATUS FROM THE ADAPTER
TEST
AL,RHRZ
IS HOR I ZONT AL RETRACE LOW
JNZ
Pll
WA I T UNT I LIT I S
P12:
NOW WA I T FOR EITHER RETRACE HIGH
IN
AL,DX
GET STATUS
TEST
AL,RVRT+RHRZ
I S HOR I ZONT AL OR VERT I CAL RETRACE HIGH
JZ
P12
WAIT UNTIL EITHER IS ACTIVE
P13:
LODSW
GET THE CHARACTER AND ATTR I BUTE
JMP
V IDEO_RETURN
EXIT WITH (AX)
READ_ AC_CURRENT ENDP
CMP
AH,1
JE
Pl0
JMP
GRAPH I CS_READ
Pl0:
CALL
FIND POSITION
MOV
SI,DT
PUSH
ES
POP
OS
READ AC CURRENT PROC
-
-CMP
AH,4
JC
Pl0
FIND POSITION
-
XCHG
MOV
SUB
SHR
MOV
CBW
MOV
SAL
MOV
JZ
XOR
P21:
P20:
MOV
AL, BYTE PTR OCRT COLS
MUL
DH
-
XOR
DH,DH
ADD
AX,OX
SAL
AX,I
ADD
OI,AX
MOV
OX, OADDR 6845
ADD
OX,6
-
RET
F I NO_POS I TI ON
ENDP
IBM Personal Computer MACRO Assembler
Version 2.00
VIOEO ---- 01/10/86
VIDEO DISPLAY BIOS
191
198
199
800
801
02EA
802
803
02EA 8A 08
804
02EC OA CO
805
02EE 14 OE
806
02FO 50
801
02F 1 8A C6
808
02F3 2A C5
809
02F5 FE CO
810
02F1 3A C3
81
I
02F9 58
812
02FA 15 02
813
02FC 2A DB
814
02FE
815
02FE C3
816
02FF
811
818
819
820
821
822
823
824
825
826
821
828
829
830
831
832
833
02FF
834
02FF 80 FC 04
835
0302 12 08
836
831
0304 80 FC 01
838
0301 14 03
839
840
0309 E9 063E R
841
030C
842
030C E8 0328 R
843
030F 8B F1
844
0311
06
845
0312 1F
846
841
848
849
03
I
3 OA DB
850
0315 15 00
851
0311
852
0311 FB
853
0318 90
854
0319 FA
855
031 A EC
856
031 B A8 0
I
851
0310 15 F8
858
031 F
859
031F EC
860
0320 A8 09
861
0322 14 FB
862
0324
863
0324 AD
864
0325 E9 0130 R
865
866
0328
861
868
869
810
0328
811
0328 86 E3
812
032A 8B E8
813
032C 80 EB 02
814
032F DO EB
815
0331
8A C1
816
0333 98
811
0334 8B F8
818
0336 01 E1
819
0338 8B 95 0050 R
880
033C 14 09
881
882
033E 33 FF
883
0340
884
0340 03 3E 004C R
885
0344 48
886
0345 15 F9
881
888
0341
889
0341 AO 004A R
890
034A F6 E6
89 I
034C 32 F6
892
034E 03 C2
893
0350 OlEO
894
0352 03 F8
895
0354 8B 16 0063 R
896
0358 83 C2 06
891
035B C3
898
899
035C

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents