is it hard to change the encoding?
is it hard to change the encoding?
hi
how can i use another encoding rather ASCII..what is the hardest way ?
to redraw the ASCII or to use anthore encoding like unicode to support many languages.. actualy i want to support arabic
hay..i searched in unicode.org but i ask her about some one tried or tutorials to read it
how can i use another encoding rather ASCII..what is the hardest way ?
to redraw the ASCII or to use anthore encoding like unicode to support many languages.. actualy i want to support arabic
hay..i searched in unicode.org but i ask her about some one tried or tutorials to read it
Hello,
While the standard letters can be exchanged with another font, you might run into problems if the letters are too long or curvy as the resolution is very low. A solution might be to switch to a graphic mode and rander the letters directly. Maybe this thread is of any help ?
regards,
gaf
While the standard letters can be exchanged with another font, you might run into problems if the letters are too long or curvy as the resolution is very low. A solution might be to switch to a graphic mode and rander the letters directly. Maybe this thread is of any help ?
regards,
gaf
this thing by John Fine allows you to change video modes and fonts
the actual source code is http://my.execpc.com/~geezer/osd/graphics/modes.c
this code is for DOS
attached is my code that I adapted to be OS independent and run in my 32bit OS
also in my code is some simple code for changing the video mode and setting the font(size) accordingly
(look for the /*PAY ATTENTION HERE )
the actual source code is http://my.execpc.com/~geezer/osd/graphics/modes.c
this code is for DOS
attached is my code that I adapted to be OS independent and run in my 32bit OS
also in my code is some simple code for changing the video mode and setting the font(size) accordingly
(look for the /*PAY ATTENTION HERE )
- Attachments
-
- temp_code.c
- my converted code
- (48.47 KiB) Downloaded 76 times
thanks
but what i want to do is convert the letters this letter A is the ascii encoding
00111100
01000010
01000010
01111110
......
i want to make it
00000000
00000000
00000000
00000000
....
i will make an array then........what ?in assembly ?
shall i mov it to the miscellanous graphic register or what ?
i saw this
but i didn't undersatnd the "dexfont" that pionts to the font ? what is the font ? arrays of every letter ?plz complete the code to change one letter then i will complete changing the rest of the letters
but what i want to do is convert the letters this letter A is the ascii encoding
00111100
01000010
01000010
01111110
......
i want to make it
00000000
00000000
00000000
00000000
....
i will make an array then........what ?in assembly ?
shall i mov it to the miscellanous graphic register or what ?
i saw this
Code: Select all
;----------------------------------------------------;
; Resizes text. ;
;----------------------------------------------------;
TextReSize:
pusha
mov ax,1112h ; Set 80x50 mode
? ? ?mov bl,0
?? int 10h
call ReProgamFonts
popa
ret
;----------------------------------------------------;
; Reprogram fonts. ;
;----------------------------------------------------;
ReProgamFonts:
push es
mov ax,ds
mov es,ax
mov bp,DexFont ;<this points to your fonts
mov cx,00FFh
xor dx,dx
mov bx,0800h
mov ax,1100h
int 10h ; ReProgams Fonts
pop es
ret
Well, I use this for loading fonts on my real mode 16-bit OS:
From masm32 package, I convert the .FNT file with BINTODB. The result is a huge DB array.
I load fonts with this function (actually it is a Pascal ASM):
and it works, if the font is loaded for
If you want to create your own font, search Google.
inflater
From masm32 package, I convert the .FNT file with BINTODB. The result is a huge DB array.
I load fonts with this function (actually it is a Pascal ASM):
Code: Select all
procedure set_font(const font); assembler;
asm
push bp
les bp,font
mov ax,1100h
mov cx,100h
mov bx,1000h
xor dx,dx
int 10h
pop bp
end;
If you want to create your own font, search Google.
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Derrick operating system: http://derrick.xf.cz (Slovak and English )
The DexFont points to a array of Dex fonts this is a full ascii set, here is a demo to make a logo with unused fonts, but to change from one font to another is the same.mohammed wrote:thanks
but what i want to do is convert the letters this letter A is the ascii encoding
00111100
01000010
01000010
01111110
......
i want to make it
00000000
00000000
00000000
00000000
....
i will make an array then........what ?in assembly ?
shall i mov it to the miscellanous graphic register or what ?
i saw thisbut i didn't undersatnd the "dexfont" that pionts to the font ? what is the font ? arrays of every letter ?plz complete the code to change one letter then i will complete changing the rest of the lettersCode: Select all
;----------------------------------------------------; ; Resizes text. ; ;----------------------------------------------------; TextReSize: pusha mov ax,1112h ; Set 80x50 mode ? ? ?mov bl,0 ?? int 10h call ReProgamFonts popa ret ;----------------------------------------------------; ; Reprogram fonts. ; ;----------------------------------------------------; ReProgamFonts: push es mov ax,ds mov es,ax mov bp,DexFont ;<this points to your fonts mov cx,00FFh xor dx,dx mov bx,0800h mov ax,1100h int 10h ; ReProgams Fonts pop es ret
In a nutshell you go to the font number * font size and change the 0 &1 like you posted.
NOTE: The above also changes the text size from normal 80x25 to 80x50.
- Attachments
-
- logo1.zip
- (5.95 KiB) Downloaded 122 times
thank you..
what we need from this code is this
the V2OSFONT is here
be patient sir what these nubers refer to ? the code of every character?is it a Hexadecimal reprentation of the binary "our 011111110" ?
if i want to change a specific letter how can i do this ?
i made this
but it didn't made any thing !!
if i have a pound for ever "?" i will be a millioner
give me one example for one letter
what we need from this code is this
Code: Select all
REPROGRAMFONT:
push es
mov ax,ds
mov es,ax
mov bp,V2OSFONT
mov cx,00FFh
xor dx, dx
mov bx, 0800h
mov ax, 1100h
int 10h ; REPROGRAM FONT
pop es
ret
Code: Select all
V2OSFONT DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H, 07EH, 081H
DB 0A5H, 081H, 0BDH, 099H, 081H, 07EH, 07EH, 0FFH, 0DBH, 0FFH
if i want to change a specific letter how can i do this ?
i made this
Code: Select all
org 100h
use16
jmp start
%INCLUDE "v2osfont.inc"
start:
push es
mov ax,ds
mov es,ax
mov bp,V2OSFONT
mov cx,00FFh
xor dx, dx
mov bx, 0800h
mov ax, 1100h
int 10h
pop es
mov ah,099H
mov al,'a'
int 10h
if i have a pound for ever "?" i will be a millioner
give me one example for one letter
If you have access to a Unix-like enviroment, you can use my psf2raw tool, based on one of the psftools. It turns a Linux psf (or psfu) font into an 8k file that can be loaded directly into VGA memory...
The tarball is attached. If you don't have psftools, it's available at
http://www.seasip.info/Unix/PSF/
Anyhow, you use it like:
psf2vga -pad <psffile> <output file>
Actually, without the -pad option, I believe that you end up with direct input to Dex's code; it can be included with "incbin" in nasm.
Finally, a multitude of font editors for psf fonts do exist... e.g. try "fonty"
[edit]Attached tarball[/edit]
The tarball is attached. If you don't have psftools, it's available at
http://www.seasip.info/Unix/PSF/
Anyhow, you use it like:
psf2vga -pad <psffile> <output file>
Actually, without the -pad option, I believe that you end up with direct input to Dex's code; it can be included with "incbin" in nasm.
Finally, a multitude of font editors for psf fonts do exist... e.g. try "fonty"
[edit]Attached tarball[/edit]
- Attachments
-
- psf2vga.tar.gz
- (3.83 KiB) Downloaded 74 times
Last edited by TheQuux on Mon Jan 01, 2007 8:21 pm, edited 1 time in total.
My project: Xenon
This is the bit you need:
To change font you do this, first look at the start of the v2osfont.inc
Now forget the first 8 byte (as they are only 0) so start at byte 9 and convert the following 8 bytes to bin eg:
01111110
10000001
10100101
10000001
10111101
10011001
10000001
01111110
You should get this http://www.dex4u.com/fonts/char.png
now all you need do is change the bits to make a differant font.
Now these fonts are 8 bytes in size so you convert the ascii number in dec and * it by 8 to find were the 8 byte fonts are in the inc.
eg: the above ascii char is 01.
You may beable to change just one char by that int, but i have not used it.
Code: Select all
REPROGRAMFONT:
push es
mov ax,ds
mov es,ax
mov bp,V2OSFONT
mov cx,00FFh
xor dx, dx
mov bx, 0800h
mov ax, 1100h
int 10h ; REPROGRAM FONT
pop es
ret
Code: Select all
V2OSFONT DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H, 07EH, 081H
DB 0A5H, 081H, 0BDH, 099H, 081H, 07EH, 07EH, 0FFH, 0DBH, 0FFH
01111110
10000001
10100101
10000001
10111101
10011001
10000001
01111110
You should get this http://www.dex4u.com/fonts/char.png
now all you need do is change the bits to make a differant font.
Now these fonts are 8 bytes in size so you convert the ascii number in dec and * it by 8 to find were the 8 byte fonts are in the inc.
eg: the above ascii char is 01.
You may beable to change just one char by that int, but i have not used it.
i don't know what to say it worked
thank you !
font.asm:
myfont.inc:
thank you !
font.asm:
Code: Select all
org 100h
use16
jmp start
%INCLUDE "myfont.inc"
start:
call REPROGRAMFONT
mov ah,0eh
mov al,01h
int 10h
REPROGRAMFONT:
push es
mov ax,ds
mov es,ax
mov bp,V2OSFONT
mov cx,00FFh
xor dx, dx
mov bx, 0800h
mov ax, 1100h
int 10h ; REPROGRAM FONT
pop es
ret
Code: Select all
V2OSFONT DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H, 01111110b, 10000001b
DB 10100101b, 10111101b ,10011001b,10000001b,01111110b