【发布时间】:2017-11-29 03:54:58
【问题描述】:
我们已经给出了使文本 CSC 112.1 居中的指令。我使用了 DB 指令和偏移量。 这是我的代码
.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
输出就是这个,并且只在左侧。
我的光标位置不显示是什么原因?而且我的DB指令也只是一个例子,就是c。
有什么建议吗?需要帮助!
【问题讨论】:
-
每个字符的开头是否有CR-LF?
-
你是什么字符?