文字最后附上常用格式,变量名对应下文中的算法
常用格式
; 常用格式
ENTERLINE macro
mov dl,13
mov ah,2
int 21h
mov dl,10
mov ah,2
int 21h
endm
DATAS SEGMENT
;此处输入数据段代码
TIP_INPUT DB 'INPUT:$'
TIP_ID DB 'Student id : 1907$'
TIP_ITH DB 'THE ITH WORLD IS:$'
TIP_VALUE DB 'THE VALUE OF N IS:$'
TIP_out db 'OUTPUT:$'
err DB 'THERE ARE ERROR!$'
FNN DW 0
flag db 0
ithn dw 0
the_i dw 0
THE_TEN Dw 10
THE_VALUE DW 0
the_remainder DW 0
THE_TRUE dw 0
THE_N DW 0
DATA_STRING DB 80H
DB 0
DB 280H DUP('$')
DATA_NUM DB 80H
DB 0
DB 280H DUP('$')
DATAS ENDS
STACKS SEGMENT
;此处输入堆栈段代码
DW 40H DUP(0)
TOP LABEL WORD
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DA