flat assembler
Message board for the users of flat assembler.

Index > DOS > How to Write Blinking text on screen?

Author
Thread Post new topic Reply to topic
Alessio



Joined: 26 Sep 2003
Posts: 35
Location: Viterbo, Italy
Alessio
Hi,
some years ago, I've seen a little proggie
that allows to do some ASCII art with blinking characters.
It is possible to reproduce it easily? (Just a blinking 'Hello World!')
I must to use INT 10h ?

Bye.
Post 17 Oct 2003, 00:27
View user's profile Send private message MSN Messenger Reply with quote
Kevin_Zheng



Joined: 04 Jul 2003
Posts: 125
Location: China
Kevin_Zheng
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
Post 17 Oct 2003, 04:01
View user's profile Send private message MSN Messenger Reply with quote
eet_1024



Joined: 22 Jul 2003
Posts: 59
eet_1024
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).
Post 17 Oct 2003, 19:30
View user's profile Send private message Reply with quote
Alessio



Joined: 26 Sep 2003
Posts: 35
Location: Viterbo, Italy
Alessio
thank you all.
Post 17 Oct 2003, 19:40
View user's profile Send private message MSN Messenger Reply with quote
Bitdog



Joined: 18 Jan 2004
Posts: 97
Bitdog
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
Post 09 Feb 2004, 05:59
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.