Assembly 显示无效消息TASM 我们不知道如何在下面的空白处显示L、N和Q。我们对这些语言还不熟悉

Assembly 显示无效消息TASM 我们不知道如何在下面的空白处显示L、N和Q。我们对这些语言还不熟悉,assembly,tasm,dosbox,Assembly,Tasm,Dosbox,我们还希望将数量与产品编号进行比较,如果数量低于零,则会出现错误/无效消息。我们不知道如何将其纳入我们的代码中 这是我们的代码: .code org 100h start:jmp main a db" ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป$" b db" บ Pasta House

我们还希望将数量与产品编号进行比较,如果数量低于零,则会出现错误/无效消息。我们不知道如何将其纳入我们的代码中

这是我们的代码:

.code
org 100h
start:jmp main
 
        a db" ษอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออป$"
        b db" บ                         Pasta House                       บ$"
        c db" บ        ษอออออป     ษอออออป     ษอออออป     ษอออออป        บ$"
        d db" บ        บ  9  บ     บ  9  บ     บ  9  บ     บ  9  บ        บ$"
        e db" บ        ศอออออผ     ศอออออผ     ศอออออผ     ศอออออผ        บ$"
        f db" บ    [c]carbonara   [f]farro  [t]fetuccini [l]lasagnia      บ$"
        g db" ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออน$"
        h db" บ                                                           บ$"
        i db" บ       what? [_]       qty? [_]      Buy again:y/n[_]      บ$"
        j db" ศอออออออออออออออออออออออออออออออออออออออออออออออออออออออออออผ$"
k db" Invalid transaction...        $"
l db" zero! $"
m db" Invalid command (press 'q' to exit) $"
n db"Sorry! Product unavailable..           $"
o db"                                         $"
p db"   Answer should be 'y','Y' or 'n','N'   $"
q db"Sorry! We're Closed.$"


w db ?
x db ?
y db ?
z db ?

string proc near
        mov ah,9
        int 21h
        ret
        string endp


down proc near
        mov ah,2
        mov dl,10
        int 21h
        mov dl,13
        int 21h
        ret
        down endp

cursor proc near
        mov ah,2
        mov bh,0
        int 10h
        ret
        cursor endp

input proc near
        mov ah,1
        int 21h
        ret
        input endp

output proc near
        mov ah,2
        int 21h
        ret
        output endp

main proc near
        mov w,39h
        mov x,39h
        mov y,39h
        mov z,39h

        mov ax,3
        int 10h

        lea dx,a
        call string
        call down

        lea dx,b
        call string
        call down

        lea dx,c
        call string
        call down

        lea dx,d
        call string
        call down

        lea dx,e
        call string
        call down

        lea dx,f
        call string
        call down

        lea dx,g
        call string
        call down

        lea dx,h
        call string
        call down

        lea dx,g
        call string
        call down

        lea dx,i
        call string
        call down

        lea dx,j
        call string
        
        mov dh,9
        mov dl,16
        call cursor

        call input

        cmp al,'c'
        je cho
 ;       cmp al,'f'
 ;       je fet
 ;       cmp al,'t'
 ;       je three
 ;       cmp al,'l'
 ;       je lol
        jne exit
cho:    mov dl,31
        mov dh,9
        call cursor
        call input
        sub w,al
        add w,30h

        mov dl,13
        mov dh,3
        call cursor

        mov dl,w
        call output

        mov dl,53
        mov dh,9
        call cursor

        call input

exit:   int 20h
        main endp
        end start

你好像迷失在你的意大利面密码里了。是的,您可以加载
dx
call cursor
,在屏幕上设置字符串l、n和q的所需输出位置。而不是逐行显示提示符,考虑替换终止符<代码> $<代码> >代码> 13,10< /代码>,并通过一个代码>调用字符串< /代码>打印整个图像。然后用调试器检查程序的逻辑。