flat assembler
Message board for the users of flat assembler.
Index
> DOS > How to Write Blinking text on screen? |
Author |
|
Kevin_Zheng 17 Oct 2003, 04:01
Dear Alessio:
About the blink char, I have two method for the request. In the first, the simple mothod is set the attribute of char. The attribute define is belowing: Bit [0-3] : Foreground color of char.(Total Color Num=16) Bit [4-6] : Background color of char---(Total Color Num=8 Bit [7] :1--Blink 0--Not Blink The second method is you fresh frequencly screen. For example, Please exectuing the t10-11.exe on the DOS enviroment. You will watch a blinked string. The t10-11.exe on the protect.zip. See my reply on the DOS forum. http://board.flatassembler.net/topic.php?t=197 |
|||
17 Oct 2003, 04:01 |
|
eet_1024 17 Oct 2003, 19:30
Quote: Bit [0-3] : Foreground color of char.(Total Color Num=16) Actually, Bit [0-2] are foreground, Bit [3] is foreground intensity; you still get 16 colors (2 shades of 8 colors). |
|||
17 Oct 2003, 19:30 |
|
Alessio 17 Oct 2003, 19:40
thank you all.
|
|||
17 Oct 2003, 19:40 |
|
Bitdog 09 Feb 2004, 05:59
Code: ;no INT writes werk JMP START PvMEM: POP SI ; pop the return address = message adr PvTOP: LODSB ;get char from DS:SI string STOSW ; write AL=char, AH=color/attribute (even the nul) OR AL,AL ;check for nul=0 JNZ PvTOP ;loop til nul JMP SI ;SI points to the adr after the string START: XOR AX,AX MOV GS,AX CMP BYTE [GS:0449h],3 ;check video mode JZ OOPS ;Vmode today PUSH WORD 0xB800 POP ES XOR DI,DI ;ES:DI = screen seg/adr upper left MOV AH,0x80+4 ; color, if bit-7 = set, color blinks, 4 = red PUSH CS POP DS CALL PvMEM ;pushes the string adr on the stack, as the RET adr DB "Howdy wurld !",0 ;IP returns here, add more code MOV WORD[GS:0450h],0x0102 move cursor to, row1, col2, page0 ENDLESS: IN AL,60h ;get port key CMP AL,1 ;ESC pressed ? JNZ ENDLESS MOV CX,4000 ;or 2000? XOR DI,DI ;ES:DI = scrn adr r0,c0,p0 MOV AX,0x0720 ; a space in color 7 REPZ STOSW ;clear screen ; restore regs here, ; add odd code here OOPS: RET ;pop 0xFFFE adr off stack = 0, machine code for INT 20h at CS:0 ;this code example is untested, but I've used the original many times ;just debug it, and it will work. (if yer a programmer?) Bitdog |
|||
09 Feb 2004, 05:59 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.