Assembly 汇编8086光标放置

Assembly 汇编8086光标放置,assembly,cursor,x86-16,placement,emu8086,Assembly,Cursor,X86 16,Placement,Emu8086,我想将光标放在“paper:”之后,等待输入,然后将光标放在“author(s):”之后。这两个句子都是打印的定义变量 插入db“*******插入新纸张*******”,0,0Ah,0Ah,0Ah,0Dh,“$” inserttitle db“论文标题:”,0Dh,0Ah,0Ah,“作者姓名:”,0Dh,“$” mainext数据库,0Ah,0Ah,0Ah,0Ah,0Ah,0Ah,0Ah,“,”$” 插入新纸张 新纸工艺 调用clrscr 偏移插入 调用printf mov dx,偏移插入标

我想将光标放在“paper:”之后,等待输入,然后将光标放在“author(s):”之后。这两个句子都是打印的定义变量

插入db“*******插入新纸张*******”,0,0Ah,0Ah,0Ah,0Dh,“$”
inserttitle db“论文标题:”,0Dh,0Ah,0Ah,“作者姓名:”,0Dh,“$”
mainext数据库,0Ah,0Ah,0Ah,0Ah,0Ah,0Ah,0Ah,“,”$”
插入新纸张
新纸工艺
调用clrscr
偏移插入
调用printf
mov dx,偏移插入标题
调用printf
mov dx,偏移量主文本
调用printf
呼叫w8click
ret
新报

调用下一个进程定位光标:

;INPUT : DL=X, DH=Y.
set_cursor proc
      mov  ah, 2                  ;◄■■ SERVICE TO SET CURSOR POSITION.
      mov  bh, 0                  ;◄■■ VIDEO PAGE.
      int  10h                    ;◄■■ BIOS SERVICES.
      RET
set_cursor endp
例如:

call clrscr

mov  dx, offset inserttitle ;◄■■ "  Title of paper:      "
call printf

mov  dl, 18                 ;◄■■ SCREEN COLUMN 18 (X).
mov  dh, 2                  ;◄■■ SCREEN ROW 2 (Y).
call set_cursor             ;◄■■ SET CURSOR POSITION.
在前面的示例中,光标将跳转到“纸张:”之后

编辑:另外两个程序,
光标打开
光标关闭
,以显示和隐藏光标:

cursor_on proc
   mov  ah, 1
   mov  cx, 4          ;◄■■ BIG CURSOR.
   int  10h
   ret
cursor_on endp


cursor_off proc
   mov  ah, 1
   mov  cx, 20h        ;◄■■ NO CURSOR.
   int  10h
   ret
cursor_off endp

这是一个接收X、Y位置的宏


gotoxy macro x y 
    mov ah,02h
    mov bh, 00h
    mov dl,x
    mov dh,y
    int 10h
    goto endm

; to call it just write: gotoxy 2,4

用户是否可以输入字符“直到输入”?是的,您应该先写论文标题,然后写作者姓名。在第二次输入后,您可以单击next(下一步)或Main(主操作)。鼠标单击已经过测试并可以工作,我只是不知道如何使用鼠标。鼠标?那么你在用鼠标?好的,这样做:当鼠标被点击时,你可以调用我的proc
set\u cursor
将光标设置在鼠标位置。@justwarmilk,如果你对我的proc
set\u cursor
有任何疑问,只需射击,它很容易使用。我确实尝试过,但它没有显示光标,不知道模拟器是否有问题。我需要添加什么才能键入?@justwarmilk,光标是否完全不可见?@justwarmilk,又添加了两个显示和隐藏光标的过程。

gotoxy macro x y 
    mov ah,02h
    mov bh, 00h
    mov dl,x
    mov dh,y
    int 10h
    goto endm

; to call it just write: gotoxy 2,4