2017-06-04 61 views
0

我在清除屏幕时遇到问题。在组装中更快地清除屏幕

我正在使用致电Clrscr但它很慢。它不够快,所以我有屏幕,黑色,没有数字,因为等待功能Clrscr完成。

call Clrscr 

    ; Write a string to the console: 
    INVOKE WriteConsole, 
     consoleHandle,    ;console output handle 
     ADDR HANGMAN_GOODGAME_00,    ; string pointer 
     messageSizeGoodGame,    ; string length 
     ADDR bytesWritten,   ; returns num bytes written 
     0       ; not used 

    mov eax, drowDelay 
    call Delay 
    call Clrscr 

    ; Write a string to the console: 
    INVOKE WriteConsole, 
     consoleHandle,    ;console output handle 
     ADDR HANGMAN_GOODGAME_01,    ; string pointer 
     messageSizeGoodGame,    ; string length 
     ADDR bytesWritten,   ; returns num bytes written 
     0       ; not used 

    mov eax, drowDelay 
    call Delay 
    call Clrscr 

    ........ 

这是照片。它的外观没有沉闷。我试图让动画.. :)

enter image description here

+1

难道你不能只输出足够多的'换行符'向上滚动视图?编辑 - 对不起,我误解了,你想让被绞死的人挥手。多么可怕。文本控制台并不是真正适合动画的地方。 –

+0

我知道它很可怕,但我看到,在一个youtube .. XD和我想补充说,我的项目.. :)这是组装,它的doble可怕.. – SakaSerbia

+1

是的,以及如果模仿你在YouTube上看到的东西是按照你的中国谚语,好运7给你。 –

回答

2

只需将光标位置。
只需使用setcursorpos从WINAPI:

push 0 
push 0 
call [SetCursorPos] 

它在user32.dll中

编辑:它wokrs的方法很简单,你设置光标位置左上角使得运动感