1
Я хочу, чтобы этот код печатал только «B», но он печатает какой-то мусор после «B», как удалить мусор? Я использую NASM.Как удалить мусор после печати алфавита?
SECTION .data
num: db "" , '$' ; reserves 1 byte in memory
SECTION .text
org 0 x100 ; assembler directive
mov ax , 33 ; this is recommended number representation
mov cx , 33 ; works smooth , but not recommended
add ax , cx
mov [num] , al ; saves result to memory
mov dx , num
mov ah , 0x9 ; system interrupt
int 0x21 ; system interrupt for printing
mov ah , 0x4c ; last two lines are
int 0x21 ; synonymous to return 0;
Попробуйте 'num: db 0, '$'' – zch