【发布时间】:2019-05-05 18:44:10
【问题描述】:
这是我的代码:
data segment
letter_a db ' __ _ ',10,13
db ' / _` | ',10,13
db '| (_| | ',10,13
db ' \__,_| ',10,13
db ' '
opening_end db 0
pointer db 10
ends
stack segment
dw 128 dup(0)
ends
code segment
start:
mov ax, data
mov ds, ax
mov es, ax
call print_opening
; wait for any key....
mov ah, 1
int 21h
call print_opening
; wait for any key....
mov ah, 1
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
ends
proc print_opening
pusha
mov al, 1
mov bh, 0
mov bl, 3
; I calculate length
lea cx, opening_end
lea dx, letter_a
sub cx, dx
mov dh, 3 ; row
mov dl, [pointer] ; col
lea bp, letter_a
mov ah, 13h
int 10h
mov ah, 8
int 21h
add [pointer], 10
popa
ret
endp print_opening
end start
问题是它只在我选择的列中开始字符串的第一行,然后返回到第 0 列。有没有办法随时缩进整个字符串?
我希望能够像在代码中一样更改它,而不仅仅是在数据段中设置缩进。
我真的希望这是可能的。提前致谢!
【问题讨论】:
标签: assembly dos x86-16 bios ascii-art