Qbasicnews.com
July 18, 2019, 08:20:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Zeros without diagonal line  (Read 1812 times)
aX*s
New Member

Posts: 3


« on: March 17, 2003, 12:35:37 PM »

This probably has been asked before, but how do I make 'zeros' appear onscreen without the diagonal line through them?

Thanks!
Logged
red_Marvin
Na_th_an
*****
Posts: 1509



WWW
« Reply #1 on: March 17, 2003, 01:20:25 PM »

As far as I know, you have to write your own font routine
or download a library that don't use the regular font:
The built in BIOS font.
Logged

/post]
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #2 on: March 17, 2003, 03:43:43 PM »

I wrote this function which loads a font file (4096 bytes) and activates it thru' a BIOS call:

Code:
SUB LoadAndSetFont (file$)
DIM font%(2047)
DIM r AS RegTypeX
f% = FREEFILE
OPEN file$ FOR BINARY AS #f%
FOR i% = 0 TO 2047: GET #f%, , font%(i%): NEXT i%
CLOSE #f%
r.ax = &H1100
r.bx = 16 * 256 + 0
r.cx = 255
r.dx = 0
r.es = VARSEG(font%(0))
r.bp = VARPTR(font%(0))
CALL INTERRUPTX(&H10, r, r)
END SUB


Of course you'll need a 4KB font file. Those fonts file just contains each one of the 256 characters, each one described with 16 bytes (text mode chars are 8x16 pixels, so you need one byte for each row), in ASCII order.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Hexadecimal Disaster
Been there, done that
*****
Posts: 1123



« Reply #3 on: March 18, 2003, 02:09:39 AM »

*laughs* *remembering good 'ol days*

Did you know how many lines of code were necessary to achieve the same thing in AtariBASIC? I had to understand r6502 machine code just to change several characters!




Oooh... I'm feeling old today...
Logged

img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #4 on: March 18, 2003, 06:30:24 PM »

Smiley In the ZX Spectrum it was so easy. You just loaded the new character set at a memory location and then poked positions 23606 and 23607 with that address in little endian Tongue
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!