Я подробно прокомментировал источник, поэтому надеюсь, что механизм печати данных битовой маски понятен ... если нет, то сначала попробуйте отладчик (чтобы посмотреть, как изменяются значения в регистрах внутри цикла печати), если он все еще сбивает с толку, не стесняйтесь спросить здесь.
ли указание сделать текст CSC 112.1 центрированным. Я использовал инструкцию БД и смещение. Это мой код
.model small
.stack
.data
c db 10,13,10,13," лллл ",10,13
db " лллллл ",10,13
db "лл лл",10,13
db "лл ",10,13
db "лл ",10,13
db "лл ",10,13
db "лл ",10,13
db "лл ",10,13
db "лл ",10,13
db "лл лл",10,13
db " лллллл ",10,13
db " лллл ",10,13,"$"
.code
mov ax,@data
mov ds,ax
call ccall ;call the procedure ccall which outputs C
call scall ;call the procedure scall which outputs S
call numcall ;call the procedure numcall which outputs 112.1
call exit ;call the procedure exit and end terminate the program
ccall proc ;procedures
mov ah,02h
mov bh,00
mov dx,043h ;set the cursor position where "04 is y coordinate" and "3 is x coordinate"
int 10h
mov ah,09h ;ouputs a string
mov dx,offset c
int 21h
call delay
ccall endp ;end of the procedure ccall
scall proc
mov ah,02h
mov bh,00
mov dx,04ah ;set the cursor position where "04 is y coordinate" and "A is x coordinate"
int 10h
mov ah,09h ;ouputs a string
mov dx,offset s
int 21h
call delay
scall endp ;end of the procedure
numcall proc ;procedure
mov ah,02h
mov bh,00
mov dx,041dh ;set the cursor position where "04 is y coordinate" and "1D is x coordinate"
int 10h
mov ah,09h ;ouputs a string
mov dx,offset num
int 21h
call delay
numcall endp
exit proc
mov ah,4ch ;terminate process
int 21h
exit endp
delay proc
mov cx,300h
D: push cx
mov cx,0ffffh
E: loop E
pop cx
loop D
ret
delay endp
end
Выход это и только на левой стороне.
По какой причине он не отображается в моем положении курсора? А также моя инструкция БД только одна в качестве примера, которая является c.
Любое предложение? Нужна помощь!