Assembler



         

- 2


TITLE . 8.18
 
= 0201 GAME_PORT EQU 201H
 
0000 STACK SEGMENT STACK
0000 0040[ DW 64 DUP (?)
????
]
0080 STACK ENDS
 
0000 CODE SEGMENT
ASSUME CS:CODE
0000 GAME_CONTROL PROC FAR
0000 1E PUSH DS ;
0001 2B C0 SUB AX, AX
0003 50 PUSH AX
0004 BA 0201 MOV DX, GAME_PORT
0007 B8 B000 MOV AX, 0B000H ;
000A 8E D8 MOV DS, AX
 
000C B5 21 MOV CH, 21H ; ,
000E B1 00 MOV CL, 0
0010 WRITE_LOOP:
0010 B4 01 MOV AH, 1 ; X
0012 E8 0042 R CALL POSITION
0015 8B D8 MOV BX, AX ; X
0017 D1 EB SHR BX, 1
0019 D1 EB SHR BX, 1 ; 4
 
. 8.18 ()
001B B4 02 MOV AH, 2 ; Y
001D E8 0042 R CALL POSITION
0020 D0 E8 SHR AL, 1
0022 D0 E8 SHR AL, 1
0024 D0 E8 SHR AL, 1