嗨,我正在组装一个简单的Hello World程序。 [比特16] [ORG 0x7C00]Assembly 16BIT NewLine
MOV SI, HelloString
CALL PrintString
MOV SI, NewLine
CALL PrintString
;New line here
MOV SI, HelloString2
CALL PrintString
JMP $
;Write String Method {
PrintCharacter:
MOV AH, 0x0E
MOV BH, 0x00
MOV BL, 0x07
INT 0x10
RET
PrintString:
next_character:
MOV AL, [SI]
INC SI
OR AL, AL
JZ exit_function
CALL PrintCharacter
JMP next_character
exit_function:
RET
;} Write String Method
HelloString db 'Hello World', 0
HelloString2 db 'Hi, my name is Ottovolante321', 0
times 510 - ($-$$) db 0
dw 0xAA55
我怎么能有两个字符串之间的换行? 感谢您的关注。
你可以在第一行添加'\ n'字符吗? – 2014-09-06 14:21:19
不工作。我试了一下 – ottovolante321 2014-09-06 14:30:57