Assembler


         

- 3


0026 D0 E8 SHR AL, 1 ; 16
0028 B4 A0 MOV AH, 160
002A F6 E4 MUL AH ;
002C 03 D8 ADD BX, AX
002E 88 2F MOV [BX], CH ;
0030 EC IN AL, DX
0031 24 10 AND AL, 10H
0033 3A C1 CMP AL, CL
0035 74 D9 JE WRITE_LOOP
0037 8A C8 MOV CL, AL
0039 80 F9 10 CMP CL, 10H
003C 75 D2 JNE WRITE_LOOP
003E FE C5 INC CH ;
0040 EB CE JMP WRITE_LOOP
 
0042 GAME_CONTROL ENDP
 
;----- AH
 
0042 POSITION PROC NEAR
0042 51 PUSH CX
0043 2B C9 SUB CX, CX ;
0045 EE OUT DX, AL ;
0046 POS_LOOP:
0046 EC IN AL, DX
0047 84 C4 TEST AL, AH
0049 E0 FB LOOPNE POS_LOOP ; 1 -
004B B8 0000 MOV AX, 0
004E 2B C1 SUB AX, CX ;
0050 59 POP CX ; 0-255
0051 C3 RET
0052 POSITION ENDP
0052 CODE ENDS
END
 
. 8.18 ()
 
. 8.18 X-Y,
,
.
,
201H.
,
.