Here is how i do font's in vesa
Code: Select all
;***********************************
; Draws text.
;***********************************
DrawImage:
mov edi,[ModeInfo_PhysBasePtr]
add edi,270*4+640*4*148
xor edx,edx
mov dl,7
cld
GetData:
lodsd
MOV ebx,eax
MOV CL,32
CheckBit:
test ebx,80000000h
JZ ZeroBit
xor eax,eax
stosd
jmp Skip
ZeroBit:
mov eax,0xffa6ffff
stosd
Skip:
shl ebx,1
loop CheckBit
add edi,640*4-32*4
dec edx
jne GetData
ret
Here are the fonts
Code: Select all
Play:
db 44h,38h,40h,78h
db 44h,44h,40h,44h
db 28h,44h,40h,44h
db 10h,7ch,40h,78h
db 10h,44h,40h,40h
db 10h,44h,40h,40h
db 10h,44h,7ch,40h
play:
Stop:
db 78h,38h,7ch,38h
db 44h,44h,10h,44h
db 44h,44h,10h,40h
db 78h,44h,10h,38h
db 40h,44h,10h,04h
db 40h,44h,10h,44h
db 40h,38h,10h,38h
stop:
You call it like this:
What it does is loads a dword in to ebx from the fonts and test each bit if its a 1 it put a pixel of one color and if its a 0 another color, normal it just inc edi by one pixel, but i need a block background, for CdPod from which this is a example.
Than it loads another dword from the fonts, and so on untill its done 7 dwords, this prints Stop and Play.
For this code to work with your vesa you need to make shore, your vesa is 32bits and instead of 640 put your vesa X size in, where you see 640.
This is just to give a demo, if you want the full fonts let me know.
Also you can get the full asm code for CdPod here:
http://board.flatassembler.net/viewtopi ... 4&start=50
Screenshot here:
http://www.falconrybells.co.uk/page2.htm
Vesa pmode cdplayer vesa fonts atapi driver keyboard input 24bit graphic, all in just 510 bytes, try doing that in C
.
\\\\||////
(@@)
ASHLEY4.