flat assembler
Message board for the users of flat assembler.

Index > OS Construction > .

Author
Thread Post new topic Reply to topic
mikegonta



Joined: 20 Nov 2005
Posts: 99
mikegonta
[ Post removed by author. ]


Last edited by mikegonta on 28 Jan 2009, 08:59; edited 1 time in total
Post 02 Nov 2008, 20:24
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1605
Location: Ukraine
shoorick
if you occasionally interesting - i may look for dos font editors. one of them i posted there - it's "not handy" - has russian interface, will look ugly on default codepage, but it is possible to find there "F#" buttons at the screen. unlike other it can scan memory for possible fonts. i had couple another seems with english interface, but they were just editors - i've been playing with them long time ago.
Post 03 Nov 2008, 06:00
View user's profile Send private message Visit poster's website Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto
Hello,
good program but why you don't use BIOS function to find fonts?

_________________
Nil Volentibus Arduum Razz
Post 03 Nov 2008, 10:33
View user's profile Send private message Reply with quote
Asmix



Joined: 07 Sep 2004
Posts: 5
Location: Ukraine
Asmix
hello mikegonta,
I think you better take a close look to the 1130h subfunction of int 10h, since it gives much more information than simple memory scanning.
Post 08 Nov 2008, 13:31
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Talking about VIDEO - GET FONT INFORMATION (EGA, MCGA, VGA)
Code:
-a
0D18:0100 mov ax, 1130
0D18:0103 mov bh, 2
0D18:0105 int10
0D18:0107 int3
0D18:0108
-g

AX=1130  BX=0200  CX=0010  DX=0018  SP=FFEE  BP=DF42  SI=0000  DI=0000
DS=0D18  ES=C000  SS=0D18  CS=0D18  IP=0107   NV UP EI PL NZ NA PO NC
0D18:0107 CC            INT     3
-a 103
0D18:0103 mov bh, 6
0D18:0105
-rip
IP 0107
:100
-g

AX=1130  BX=0600  CX=0010  DX=0018  SP=FFEE  BP=DF42  SI=0000  DI=0000
DS=0D18  ES=C000  SS=0D18  CS=0D18  IP=0107   NV UP EI PL NZ NA PO NC
0D18:0107 CC            INT     3
-    

(Return is ES:BP)
What am I doing wrong? I'm requesting the 8x14 font set but the pointer is the same for the 8x16 font set Confused

PS: Other values seems to work, but specifically the 8x14 returns me the 8x16 pointer instead...
Here proof that the pointer is the 8x16 one:
Code:
; TODO: Allow the user to change the zoom factor in runtime (the code is somewhat ready for that)
; TODO: After implementing the TODO above, draw the character on the center of the screen
ESQ   = 27
COLOR = 9;12;9
ZOOM  = 12

org $100

      mov     ax, $13
      int     $10

begin:
      xor     ax, ax
      int     $16

      cmp     al, ESQ
      je      exit

      xor     ah, ah
      mov     cl, 4
      shl     ax, cl
      push    ax

      mov     ax, $1130
      mov     bh, 6
      int     $10

      pop     di
      lea     si, [bp + di + 1]
      xor     di, di
      push    es
      pop     ds
      mov     ax, $A000
      mov     es, ax
      mov     bl, 16 ; 16 rows
      mov     ch, ZOOM
      mov     cl, ZOOM
      mov     bp, -ZOOM*8

; SI = font pointer
; DI = screen pointer
; BL = rows counter
; BH = columns counter
; CH = row zoom counter
; DH = column zoom counter
; CL = zoom factor

paint:
      dec     si

outerLoop:
      lodsb
      mov     dl, al
      mov     bh, 8  ; 8 columns

innerLoop:
      mov     dh, ZOOM
      shl     dl, 1
      sbb     al, al
      and     al, COLOR

putPixel:
      stosb
      dec     dh
      jnz     putPixel

      dec     bh
      jnz     innerLoop

      lea     di, [di+320+bp]

      dec     ch
      jnz     paint

      mov     ch, ZOOM
      dec     bl
      jnz     outerLoop

      jmp     begin

exit:
      mov     ax, 3
      int     $10

      int     $20    
Post 23 Nov 2008, 21:01
View user's profile Send private message Reply with quote
mikegonta



Joined: 20 Nov 2005
Posts: 99
mikegonta
[ Post removed by author. ]


Last edited by mikegonta on 28 Jan 2009, 08:59; edited 1 time in total
Post 23 Nov 2008, 21:13
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

Not all video BIOS have the 8x14 EGA font so the BIOS returns the 8x16 VGA font instead

Oh, I see. What a pity it doesn't return an error code instead...

Thanks for the info
Post 23 Nov 2008, 21:24
View user's profile Send private message Reply with quote
mikegonta



Joined: 20 Nov 2005
Posts: 99
mikegonta
[ Post removed by author. ]


Last edited by mikegonta on 28 Jan 2009, 08:59; edited 1 time in total
Post 23 Nov 2008, 21:53
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17272
Location: In your JS exploiting you and your system
revolution
What will you do with these fonts once you have collected them?
Post 23 Nov 2008, 21:59
View user's profile Send private message Visit poster's website Reply with quote
mikegonta



Joined: 20 Nov 2005
Posts: 99
mikegonta
[ Post removed by author. ]


Last edited by mikegonta on 28 Jan 2009, 09:00; edited 1 time in total
Post 23 Nov 2008, 22:12
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Quote:
Not all video BIOS have the 8x14 EGA font so


http://www.bttr-software.de/products/fix8x14/
Post 24 Nov 2008, 11:15
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Thanks, I'll have a look at it.
Post 24 Nov 2008, 14:17
View user's profile Send private message Reply with quote
mikegonta



Joined: 20 Nov 2005
Posts: 99
mikegonta
[ Post removed by author. ]
Post 30 Nov 2008, 00:08
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.

Powered by rwasa.