-1
everyone,NASM彙編字節邊界對齊
我是學習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) = ', '$'
明白了,非常感謝你! – shanwu 2013-02-24 05:00:40