本文中的汇编语言是基于x86芯片,下面给出代码:
;TITLE GAME4TH
PAGE 60,132
STSEG SEGMENT
DB 64 DUP (0)
STSEG ENDS
;-----------------------------------
DTSEG SEGMENT
DATAH DB 10H,10H,10H,10H,10H,10H,10H,10H,10H
DATAL DB 20H,21H,22H,23H,24H,25H,26H,27H,28H
DTSEG ENDS
CR EQU 0DH
LF EQU 0AH
;------------------------------------
CDSEG SEGMENT
MAIN PROC FAR
ASSUME CS:CDSEG,DS:DTSEG,SS:STSEG
MOV AX,DTSEG
MOV DS,AX
MOV AX,0600H
MOV BH,00011110B
MOV CX,0
MOV DH,18H
MOV DL,04FH
INT 10H
FISH: MOV AX,0600H
MOV BH,00011110B
MOV CX,0
MOV DH,18H
MOV DL,04FH
INT 10H
MOV AH,02
MOV BH,00
MOV SI,OFFSET DATAH
MOV DI,OFFSET DATAL
MOV DH,[SI]
MOV DL,[DI]
INT 10H
MOV AX,0201H
MOV DL,