實驗九範例
實驗九, 幾年前我寫過一次, 現在又重學了一次, 沒在用放著很快就忘了ASSUME CS:CODE, DS:DATA; SS:STACK
DATA SEGMENT
DB 'welcome to masm!'
DATA ENDS
STACK SEGMENT
DB 48 DUP (' ')
STACK ENDS
CODE SEGMENT
MAIN:
MOV AX,DATA
MOV DS,AX
MOV AX,0B86EH
MOV ES,AX
MOV AX,STACK
MOV SS,AX
MOV SP,0
MOV DI,0
MOV SI,0
MOV DX,0
MOV CX,3
S1:
PUSH CX
SUB CX,1
JCXZ C3
POP CX
PUSH CX
SUB CX,2
JCXZ C2
POP CX
PUSH CX
SUB CX,3
JCXZ C1 ;這幾個步驟主要是作CASE 的選擇
S2:
MOV CX,16
S3:
MOV AL,
MOV ES:64,AX
ADD DI,2
INC SI
LOOP S3
ADD DI,128
MOV SI,0
POP CX
LOOP S1
MOV AX,4C00H
INT 21H
C1:
MOV AH,10000010B
JMP SHORT S2
C2:
MOV AH,10100100B
JMP SHORT S2
C3:
MOV AH,10011110B
JMP SHORT S2
CODE ENDS
END MAIN
页:
[1]