每个人,
我是学习 NASM 汇编语言的新手。从我的教科书中,示例代码之一如下:
ORG 0100H
JMP start
value DW 0
csmsg DB 13,10, 'CS (in hex) = ', '$'
dsmsg DB 13,10, 'DS (in hex) = ', '$'
esmsg DB 13,10, 'ES (in hex) = ', '$'
ssmsg DB 13,10, 'SS (in hex) = ', '$'
spmsg DB 13,10, 'SP (in hex) = ', '$'
;
%include "../mymacro/showbyte.mac"
;
start:
MOV [value], CS
MOV DX, csmsg
CALL show
;
MOV [value], DS
MOV DX, dsmsg
CALL show
;
MOV [value], ES
MOV DX, esmsg
CALL show
;
MOV [value], SS
MOV DX, ssmsg
CALL show
;
MOV [value], SP
MOV DX, spmsg
CALL show
;
MOV AX, 4c00H
INT 21H
show:
MOV AH,09H
INT 21H
showbyte value+1;
showbyte value
RET
我的问题是我不知道以下代码行是做什么的......以及为什么我们需要这样做:
csmsg DB 13,10, 'CS (in hex) = ', '$'