VOGONS


First post, by theelf

User metadata
Rank Oldbie
Rank
Oldbie

Greetings, i'm a bit rusty with x86 asm and Pascal, please forgive me jeje, im trying to load a custom font in Pascal 7 DOS, i made in a very nice program Fontraption

The font is 8x16 and 4096bytes, Fontraption is able to export font to a com executable. I checked and only difference from com to font is this code 56494C451A0083C403B81011BD1901B9000199BB0010CD10C300 .

Disassemble this give me

0:  56                      push   esi
1: 49 dec ecx
2: 4c dec esp
3: 45 inc ebp
4: 1a 00 sbb al,BYTE PTR [eax]
6: 83 c4 03 add esp,0x3
9: b8 10 11 bd 19 mov eax,0x19bd1110
e: 01 b9 00 01 99 bb add DWORD PTR [ecx-0x4466ff00],edi
14: 00 10 add BYTE PTR [eax],dl
16: cd 10 int 0x10
18: c3 ret
19: 00 .byte 0x0

Then im trying to do in pascal, but like i said im very rusty... any ideas why not working? (for sure everything is BAD)

Thank a lot in advance

program test;

uses
Dos, Crt;

var
FontFile: File;
FontBuffer: array[0..4095] of Byte;
i: Integer;

begin
ClrScr;

Assign(FontFile, 'font.f16');
Reset(FontFile, 1);

BlockRead(FontFile, FontBuffer, SizeOf(FontBuffer));
Close(FontFile);

asm

mov ah, 0
mov al, 3
int 10h

mov ah, 11h
mov dx, 0

lea si, FontBuffer
mov cx, 256

@loadFontLoop:
mov al, cl
int 10h

inc si
loop @loadFontLoop

end;

ReadLn;
end.

Reply 1 of 8, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Your disassembly is not 16 bit, here is one that is more useful

56                          push    si
49 dec cx
4C dec sp
45 inc bp
1A 00 sbb al, [bx+si]
83 C4 03 add sp, 3
B8 10 11 mov ax, 1110h
BD 19 01 mov bp, 119h
B9 00 01 mov cx, 100h
99 cwd
BB 00 10 mov bx, 1000h
CD 10 int 10h
C3 retn

You probably don't need the "retn"

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 8, by verysaving

User metadata
Rank Newbie
Rank
Newbie

Back in the days I used this piece of code to add custom fonts to my programs.

Unit Fonts;
Interface

Procedure LoadFont;

Implementation
Uses
Dos;

Const
Font : Array [1..4096] OF Byte =
(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,60,66,129,165,129,129,165,153,66,60,0,0,0,0,
0,0,60,126,255,219,255,255,219,231,126,60,0,0,0,0,
0,0,0,0,102,255,255,255,255,126,60,24,0,0,0,0,
0,0,0,0,24,60,126,255,126,60,24,0,0,0,0,0,
0,0,0,24,60,60,90,255,255,90,24,60,0,0,0,0,
0,0,0,24,60,126,255,255,255,90,24,60,0,0,0,0,
0,0,0,0,0,0,24,60,60,24,0,0,0,0,0,0,
255,255,255,255,255,255,231,195,195,231,255,255,255,255,255,255,
0,0,0,0,0,60,102,66,66,102,60,0,0,0,0,0,
255,255,255,255,255,195,153,189,189,153,195,255,255,255,255,255,
0,0,15,7,13,24,126,195,195,195,198,124,0,0,0,0,
0,0,126,195,195,198,124,24,24,126,24,24,0,0,0,0,
0,0,4,6,7,5,4,4,4,60,124,56,0,0,0,0,
0,16,24,28,30,22,18,18,114,242,98,14,30,12,0,0,
0,0,24,24,219,126,60,255,60,126,219,24,24,0,0,0,
0,64,96,112,120,124,126,124,120,112,96,64,0,0,0,0,
0,2,6,14,30,62,126,62,30,14,6,2,0,0,0,0,
0,0,0,24,60,126,24,24,24,24,126,60,24,0,0,0,
0,0,102,255,255,255,255,102,102,0,102,102,0,0,0,0,
0,0,127,219,219,219,123,59,31,27,27,27,0,0,0,0,
0,30,48,120,220,206,231,115,59,30,12,120,0,0,0,0,
0,0,0,0,0,0,0,0,126,126,126,126,0,0,0,0,
0,0,0,24,60,126,24,24,24,126,60,24,0,0,127,0,
0,0,0,0,16,56,124,254,56,56,56,56,0,0,0,0,
0,0,0,0,56,56,56,56,254,124,56,16,0,0,0,0,
0,0,0,0,0,8,12,254,255,254,12,8,0,0,0,0,
0,0,0,0,0,16,48,127,255,127,48,16,0,0,0,0,
0,0,51,102,238,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,36,102,255,255,102,36,0,0,0,0,0,
0,0,0,16,16,56,56,124,124,254,254,0,0,0,0,0,
0,0,0,254,254,124,124,56,56,16,16,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,24,60,60,60,60,24,24,0,24,24,0,0,0,0,
0,0,119,102,204,0,0,0,0,0,0,0,0,0,0,0,
0,0,102,102,255,102,102,102,102,255,102,102,0,0,0,0,
0,24,126,219,216,120,28,30,27,219,219,126,24,0,0,0,
0,0,0,112,219,118,12,24,48,110,219,14,0,0,0,0,
0,0,60,102,102,60,120,204,199,198,206,123,0,0,0,0,
0,0,28,24,48,0,0,0,0,0,0,0,0,0,0,0,
0,6,12,24,24,48,48,48,48,24,24,12,6,0,0,0,
0,96,48,24,24,12,12,12,12,24,24,48,96,0,0,0,
0,0,0,0,24,24,255,60,60,102,0,0,0,0,0,0,
0,0,0,0,24,24,24,255,24,24,24,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,28,24,48,32,0,0,
0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,
0,0,6,4,12,8,24,16,48,32,96,64,192,0,0,0,
0,0,62,99,195,195,219,219,195,195,198,124,0,0,0,0,
0,0,24,56,120,24,24,24,24,24,24,24,0,0,0,0,
0,0,126,195,3,3,6,12,24,48,96,255,0,0,0,0,
0,0,126,195,3,3,30,3,3,3,198,124,0,0,0,0,
0,0,6,14,30,54,102,198,255,6,6,6,0,0,0,0,
0,0,255,192,192,254,3,3,3,3,198,124,0,0,0,0,
0,0,62,96,192,192,254,195,195,195,198,124,0,0,0,0,
0,0,255,3,6,12,12,24,24,48,48,48,0,0,0,0,
0,0,62,99,195,195,126,195,195,195,198,124,0,0,0,0,
0,0,62,99,195,195,195,127,3,3,6,124,0,0,0,0,
0,0,0,0,24,24,0,0,0,24,24,0,0,0,0,0,
0,0,0,0,24,24,0,0,0,24,24,48,0,0,0,0,
0,0,0,6,12,24,48,96,48,24,12,6,0,0,0,0,
0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,0,
0,0,0,96,48,24,12,6,12,24,48,96,0,0,0,0,
0,0,126,195,3,3,14,24,24,0,24,24,0,0,0,0,
0,0,62,99,207,219,219,219,219,222,96,62,0,0,0,0,
0,0,62,99,195,195,195,195,255,195,195,195,0,0,0,0,
0,0,252,198,198,198,254,195,195,195,198,252,0,0,0,0,
0,0,62,99,192,192,192,192,192,192,195,126,0,0,0,0,
0,0,254,195,195,195,195,195,195,195,198,252,0,0,0,0,
0,0,254,192,192,192,254,192,192,192,192,254,0,0,0,0,
0,0,254,192,192,192,254,192,192,192,192,192,0,0,0,0,
0,0,62,99,192,192,192,207,195,195,198,124,0,0,0,0,
0,0,195,195,195,195,255,195,195,195,195,195,0,0,0,0,
0,0,24,24,24,24,24,24,24,24,24,24,0,0,0,0,
0,0,3,3,3,3,3,3,195,195,198,124,0,0,0,0,
0,0,195,198,204,216,240,240,216,204,198,195,0,0,0,0,
0,0,192,192,192,192,192,192,192,192,192,255,0,0,0,0,
0,0,129,195,231,255,219,219,195,195,195,195,0,0,0,0,
0,0,131,195,227,243,219,207,199,195,195,195,0,0,0,0,
0,0,62,99,195,195,195,195,195,195,198,124,0,0,0,0,
0,0,254,195,195,195,198,252,192,192,192,192,0,0,0,0,
0,0,62,99,195,195,195,195,195,251,206,124,6,3,0,0,
0,0,254,195,195,195,198,252,198,198,195,195,0,0,0,0,
0,0,62,99,192,192,126,3,3,3,198,124,0,0,0,0,
0,0,255,24,24,24,24,24,24,24,24,24,0,0,0,0,
0,0,195,195,195,195,195,195,195,195,198,124,0,0,0,0,
0,0,195,195,195,195,195,195,195,102,60,24,0,0,0,0,
0,0,195,195,195,195,195,219,219,255,231,195,0,0,0,0,
0,0,195,195,102,102,60,60,102,102,195,195,0,0,0,0,
0,0,195,195,102,102,60,24,24,24,24,24,0,0,0,0,
0,0,255,7,6,12,28,56,48,96,224,255,0,0,0,0,
0,62,48,48,48,48,48,48,48,48,48,48,62,0,0,0,
0,0,192,64,96,32,48,16,24,8,12,4,6,0,0,0,
0,124,12,12,12,12,12,12,12,12,12,12,124,0,0,0,
0,16,56,108,198,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,
0,0,56,24,12,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,62,3,63,99,195,195,127,0,0,0,0,
0,0,192,192,192,254,195,195,195,195,198,252,0,0,0,0,
0,0,0,0,0,62,99,192,192,192,195,126,0,0,0,0,
0,0,3,3,3,63,99,195,195,195,195,127,0,0,0,0,
0,0,0,0,0,62,99,195,198,252,192,126,0,0,0,0,
0,0,62,99,99,96,248,96,96,96,96,96,0,0,0,0,
0,0,0,0,0,63,99,195,195,195,127,3,3,6,124,0,
0,0,192,192,192,254,195,195,195,195,195,195,0,0,0,0,
0,0,24,24,0,24,24,24,24,24,24,24,0,0,0,0,
0,0,6,6,0,6,6,6,6,6,6,6,6,204,120,0,
0,0,192,192,192,198,204,216,248,236,198,195,0,0,0,0,
0,0,56,24,24,24,24,24,24,24,24,24,0,0,0,0,
0,0,0,0,0,254,219,219,219,195,195,195,0,0,0,0,
0,0,0,0,0,254,195,195,195,195,195,195,0,0,0,0,
0,0,0,0,0,62,99,195,195,195,198,124,0,0,0,0,
0,0,0,0,0,254,195,195,195,195,198,252,192,192,192,0,
0,0,0,0,0,63,99,195,195,195,195,127,3,3,3,0,
0,0,0,0,0,254,195,192,192,192,192,192,0,0,0,0,
0,0,0,0,0,62,99,192,126,3,198,124,0,0,0,0,
0,0,8,24,24,127,24,24,24,24,24,15,0,0,0,0,
0,0,0,0,0,195,195,195,195,195,198,124,0,0,0,0,
0,0,0,0,0,195,195,195,195,102,60,24,0,0,0,0,
0,0,0,0,0,195,195,195,219,219,255,195,0,0,0,0,
0,0,0,0,0,195,102,60,24,60,102,195,0,0,0,0,
0,0,0,0,0,195,195,195,195,195,127,3,3,6,124,0,
0,0,0,0,0,255,6,12,24,48,96,255,0,0,0,0,
0,0,14,24,24,24,24,112,24,24,24,24,14,0,0,0,
0,0,24,24,24,24,24,0,24,24,24,24,24,0,0,0,
0,0,112,24,24,24,24,14,24,24,24,24,112,0,0,0,
0,0,0,0,0,0,118,220,0,0,0,0,0,0,0,0,
0,0,0,0,16,56,108,198,198,254,0,0,0,0,0,0,
0,0,62,99,192,192,192,192,192,192,195,126,12,120,0,0,
0,0,102,102,0,195,195,195,195,195,198,124,0,0,0,0,
0,6,12,24,0,126,195,195,198,252,192,126,0,0,0,0,
0,12,30,51,0,62,3,63,99,195,195,127,0,0,0,0,
0,0,54,54,0,62,3,63,99,195,195,127,0,0,0,0,
0,48,24,12,0,62,3,63,99,195,195,127,0,0,0,0,
28,54,54,28,0,62,3,63,99,195,195,127,0,0,0,0,
0,0,0,0,0,62,99,192,192,192,195,126,12,120,0,0,
0,24,60,102,0,126,195,195,198,252,192,126,0,0,0,0,
0,0,102,102,0,126,195,195,198,252,192,126,0,0,0,0,
0,96,48,24,0,126,195,195,198,252,192,126,0,0,0,0,
0,0,102,102,0,24,24,24,24,24,24,24,0,0,0,0,
0,24,60,102,0,24,24,24,24,24,24,24,0,0,0,0,
0,96,48,24,0,24,24,24,24,24,24,24,0,0,0,0,
102,0,62,99,195,195,195,195,255,195,195,195,0,0,0,0,
60,102,102,60,102,195,195,195,255,195,195,195,0,0,0,0,
12,24,48,254,192,192,254,192,192,192,192,254,0,0,0,0,
0,0,0,0,0,126,27,123,223,216,216,110,0,0,0,0,
0,0,63,60,60,108,111,108,252,204,204,207,0,0,0,0,
0,24,60,102,0,62,99,195,195,195,198,124,0,0,0,0,
0,0,102,102,0,62,99,195,195,195,198,124,0,0,0,0,
0,96,48,24,0,62,99,195,195,195,198,124,0,0,0,0,
0,24,60,102,0,195,195,195,195,195,198,124,0,0,0,0,
0,96,48,24,0,195,195,195,195,195,198,124,0,0,0,0,
0,0,102,102,0,195,195,195,195,195,127,3,3,6,124,0,
102,102,62,99,195,195,195,195,195,195,198,124,0,0,0,0,
102,102,0,195,195,195,195,195,195,195,198,124,0,0,0,0,
0,0,0,8,8,62,107,200,200,200,203,126,8,8,0,0,
0,0,28,54,96,248,96,248,96,96,99,126,0,0,0,0,
0,0,195,195,102,102,60,24,126,24,126,24,24,0,0,0,
0,0,254,195,195,195,206,248,198,207,198,198,3,0,0,0,
0,0,30,51,51,48,124,48,48,48,48,48,224,0,0,0,
0,6,12,24,0,62,3,63,99,195,195,127,0,0,0,0,
0,6,12,24,0,24,24,24,24,24,24,24,0,0,0,0,
0,6,12,24,0,62,99,195,195,195,198,124,0,0,0,0,
0,12,24,48,0,195,195,195,195,195,198,124,0,0,0,0,
0,0,118,220,0,254,195,195,195,195,195,195,0,0,0,0,
118,220,0,195,227,243,219,207,199,195,195,195,0,0,0,0,
0,0,60,6,62,102,198,198,126,0,254,0,0,0,0,0,
0,0,60,102,198,198,198,204,120,0,254,0,0,0,0,0,
0,0,24,24,0,24,24,112,192,192,195,126,0,0,0,0,
0,0,0,0,0,0,254,192,192,192,0,0,0,0,0,0,
0,0,0,0,0,0,254,6,6,6,0,0,0,0,0,0,
0,96,225,99,102,108,24,48,96,206,155,6,12,31,0,0,
0,96,225,99,102,108,24,48,102,206,150,63,6,6,0,0,
0,0,24,24,0,24,24,60,60,60,60,24,0,0,0,0,
0,0,0,0,0,54,108,216,108,54,0,0,0,0,0,0,
0,0,0,0,0,216,108,54,108,216,0,0,0,0,0,0,
130,16,130,16,130,16,130,16,130,16,130,16,130,16,130,16,
0,149,0,169,0,149,0,169,0,149,0,169,0,149,0,169,
146,73,146,73,146,73,146,73,146,73,146,73,146,73,146,73,
24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
24,24,24,24,24,24,24,248,24,24,24,24,24,24,24,24,
24,24,24,24,24,24,248,24,24,248,24,24,24,24,24,24,
102,102,102,102,102,102,102,230,102,102,102,102,102,102,102,102,
0,0,0,0,0,0,0,254,102,102,102,102,102,102,102,102,
0,0,0,0,0,0,248,24,24,248,24,24,24,24,24,24,
102,102,102,102,102,102,230,6,6,230,102,102,102,102,102,102,
102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
0,0,0,0,0,0,254,6,6,230,102,102,102,102,102,102,
102,102,102,102,102,102,230,6,6,254,0,0,0,0,0,0,
102,102,102,102,102,102,102,254,0,0,0,0,0,0,0,0,
24,24,24,24,24,24,248,24,24,248,0,0,0,0,0,0,
0,0,0,0,0,0,0,248,24,24,24,24,24,24,24,24,
24,24,24,24,24,24,24,31,0,0,0,0,0,0,0,0,
24,24,24,24,24,24,24,255,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,255,24,24,24,24,24,24,24,24,
24,24,24,24,24,24,24,31,24,24,24,24,24,24,24,24,
0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,
24,24,24,24,24,24,24,255,24,24,24,24,24,24,24,24,
24,24,24,24,24,24,31,24,24,31,24,24,24,24,24,24,
102,102,102,102,102,102,102,103,102,102,102,102,102,102,102,102,
102,102,102,102,102,102,103,96,96,127,0,0,0,0,0,0,
0,0,0,0,0,0,127,96,96,103,102,102,102,102,102,102,
102,102,102,102,102,102,231,0,0,255,0,0,0,0,0,0,
0,0,0,0,0,0,255,0,0,231,102,102,102,102,102,102,
102,102,102,102,102,102,103,96,96,103,102,102,102,102,102,102,
0,0,0,0,0,0,255,0,0,255,0,0,0,0,0,0,
102,102,102,102,102,102,231,0,0,231,102,102,102,102,102,102,
24,24,24,24,24,24,255,0,0,255,0,0,0,0,0,0,
102,102,102,102,102,102,102,255,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,255,0,0,255,24,24,24,24,24,24,
0,0,0,0,0,0,0,255,102,102,102,102,102,102,102,102,
102,102,102,102,102,102,102,127,0,0,0,0,0,0,0,0,
24,24,24,24,24,24,31,24,24,31,0,0,0,0,0,0,
0,0,0,0,0,0,31,24,24,31,24,24,24,24,24,24,
0,0,0,0,0,0,0,127,102,102,102,102,102,102,102,102,
102,102,102,102,102,102,102,255,102,102,102,102,102,102,102,102,
24,24,24,24,24,24,255,0,0,255,24,24,24,24,24,24,
24,24,24,24,24,24,24,248,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,31,24,24,24,24,24,24,24,24,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,
240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,119,220,204,204,222,115,0,0,0,0,
0,0,28,38,102,236,198,198,198,198,204,184,128,0,0,0,
0,0,255,195,195,192,192,192,192,192,192,192,0,0,0,0,
0,0,0,0,3,254,108,108,108,108,108,108,0,0,0,0,
0,0,255,195,97,48,24,48,96,193,195,255,0,0,0,0,
0,0,0,0,0,63,108,204,204,204,216,112,0,0,0,0,
0,0,0,0,0,99,99,99,99,99,102,124,96,96,192,0,
0,0,0,0,119,220,24,24,24,24,24,24,0,0,0,0,
0,0,24,24,126,219,219,219,219,126,24,24,0,0,0,0,
0,0,62,99,195,195,255,195,195,195,198,124,0,0,0,0,
0,0,62,99,195,195,195,195,102,36,165,231,0,0,0,0,
0,0,30,48,24,12,62,102,198,198,204,120,0,0,0,0,
0,0,0,0,0,126,219,219,219,126,0,0,0,0,0,0,
0,0,0,3,6,126,207,219,243,126,96,192,0,0,0,0,
0,0,30,48,96,96,126,96,96,96,48,30,0,0,0,0,
0,0,0,62,99,195,195,195,195,195,195,195,0,0,0,0,
0,0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,
0,0,0,24,24,24,255,24,24,24,0,255,0,0,0,0,
0,0,0,48,24,12,6,12,24,48,0,255,0,0,0,0,
0,0,0,12,24,48,96,48,24,12,0,255,0,0,0,0,
0,0,0,14,27,27,24,24,24,24,24,24,24,24,24,24,
24,24,24,24,24,24,24,24,24,216,216,112,0,0,0,0,
0,0,0,0,24,24,0,255,0,24,24,0,0,0,0,0,
0,0,0,0,0,118,220,0,118,220,0,0,0,0,0,0,
0,0,60,102,102,60,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,8,28,8,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,
0,0,3,2,6,4,12,8,216,240,112,32,0,0,0,0,
0,0,252,198,198,198,198,198,0,0,0,0,0,0,0,0,
0,0,120,204,24,48,96,252,0,0,0,0,0,0,0,0,
0,0,0,219,219,219,219,219,219,219,219,219,219,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);

Procedure LoadFont;
Var
r : Registers;
Begin
r.AH:=$11;
r.AL:=0;
r.BL:=0;
r.ES:=Seg(Font);
r.BP:=Ofs(Font);
r.CX:=256;
r.DX:=0;
r.BH:=16;
Intr($10,r);
End;

Begin
End.

Reply 3 of 8, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie

A real program would never have dec esp or dec sp in it. That 56 49 4c 45 header would spell VILE; does that mean anything?

Reply 4 of 8, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
jakethompson1 wrote on 2025-02-23, 00:52:

A real program would never have dec esp or dec sp in it. That 56 49 4c 45 header would spell VILE; does that mean anything?

Probably. It was written by VileR (who is a member here).

Reply 5 of 8, by VileR

User metadata
Rank l33t
Rank
l33t

Ha, yes, that's just a signature I used to verify the TSR installation check, so that any previously loaded resident font can be removed first.

@theelf: when you're simply including a font with your own program (i.e. no TSR stuff needed), the relevant part is within the code in Qbix's post. Here's a commented version for clarification:

mov    ax, 1110h         ; function: load user-defined font
mov bp, offset font ; ES:BP = pointer to font data
mov bx, 1000h ; BH = bytes per char (16), BL = block (0)
mov cx, 256 ; character count
cwd ; DX = offset of first character to load (0)
int 10h ; call video BIOS

See also Int 10/AX=1100h (RBIL).

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 6 of 8, by theelf

User metadata
Rank Oldbie
Rank
Oldbie

Hi! thanks a lot for all of your help! with your good advice finally i fix the code

@VileR are you coder of Fontraption? my congratulations, very good software, thank you

I paste here in case is usefull for someone

program VGA_Font_Load;

uses
Dos, Crt;

var
FontFile: File;
FontBuffer: array[0..4095] of Byte;
Regs: Registers;

begin
ClrScr;

Assign(FontFile, 'font.f16');
Reset(FontFile, 1);
BlockRead(FontFile, FontBuffer, SizeOf(FontBuffer));
Close(FontFile);

Regs.AH := $00;
Regs.AL := $03;
Intr($10, Regs);


Regs.AX := $1110;
Regs.BP := Ofs(FontBuffer);
Regs.ES := Seg(FontBuffer);
Regs.BX := $1000;
Regs.CX := 256;
Regs.DX := 0;
Intr($10, Regs);

ReadLn;
end.

Reply 7 of 8, by VileR

User metadata
Rank l33t
Rank
l33t

Cool that you got it to work. And glad to hear you like Fontraption! I've been working on v2, which should have a bunch of improvements (multiple undo/redo steps, auto-preview in the file dialog, a better interface for >16-line fonts... and maybe mouse support, for the lulz).

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 8 of 8, by theelf

User metadata
Rank Oldbie
Rank
Oldbie
VileR wrote on 2025-02-23, 16:57:

Cool that you got it to work. And glad to hear you like Fontraption! I've been working on v2, which should have a bunch of improvements (multiple undo/redo steps, auto-preview in the file dialog, a better interface for >16-line fonts... and maybe mouse support, for the lulz).

Thanks a lot,I am very grateful to you and everyone who helped me

Really like your software, you did a great work, and believe me is one of my must, i have in my 386and 486 laptop, in my Pentium computer, in my i5 in DOSbox... i like to do creative fonts for my projects!

thanks, waiting for new version... mouse suport will be cool jeje