×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

DEF SEG ADDRESSES

DEF SEG ADDRESSES

DEF SEG ADDRESSES

(OP)
I was wondering what the DEF SEG = &HFFA6 is pointing to? And also could you tell me more useful memory addresses. Any would be fine. THX

RE: DEF SEG ADDRESSES

Def Seg &HB800
Text mode screen
for loading screen image (text)
def seg &HA000
VGA mode screen 12 (most others too)

RE: DEF SEG ADDRESSES

&HA000 is video memory...

I believe even Vesa modes bank the data through this segment... (Not Sure)

Have Fun, Be Young... Code BASIC
-Josh

http://cubee.topcities.com

RE: DEF SEG ADDRESSES

(OP)
but what about DEF SEG + &HFFA6
and I also have 1 more question what is a buffer and what does it mean. THX

RE: DEF SEG ADDRESSES

&Hffa6 is somewhere towards the top of the bios.

A buffer is an area of memory set aside to receive data.

rgds
Zeit.

RE: DEF SEG ADDRESSES


&HFFA6 is where the bios font is stored.

doing....

DEF SEG = &HAFFA6

...points to this location.  Then you can use PEEK to retrieve the font data.  Here's a small SUB that uses this method which prints words on the screen without using PRINT.


DEFINT A-Z

DECLARE SUB BIOSPRINT (x%, y%, Text$, clr%)

SCREEN 13

BIOSPRINT 12, 12, "Hello", 12

DEFSNG A-Z
SUB BIOSPRINT (x%, y%, Text$, clr%)
'================================
'x%, y% = location to print.
'Text$ = Text to print
'clr% = Color of text
'================================

FOR d% = 1 TO LEN(Text$)
   FOR c% = 0 TO 7
     DEF SEG = &HFFA6
     l% = PEEK(14 + 8 * ASC(MID$(Text$, d%, 1)) + c%)
     x1% = x% + d% * 8 - 1
     x2% = x% + d% * 8 + 15: a% = 7
     FOR b% = x1% TO x2%
       IF l% AND 2 ^ a% THEN
         PSET (b%, c% + y%), clr%
       END IF: a% = a% - 1
     NEXT
   NEXT
NEXT

DEF SEG

END SUB



People often use method instead PRINT because the text has a transparent background,instead of blocking out the background the way PRINT does.

- Dav

My Qbasic Source code....
http://sys.blissdev.com/dav/

RE: DEF SEG ADDRESSES

(OP)
So using that you could change the font?

RE: DEF SEG ADDRESSES

Yeah,
  Such as a video buffer... it is an area (or array) of memory where you use to set up the screen for quick 'flipping'... this way you don't see the changes being made to the image until it is done... also, it is usually faster to use 'Normal' memory then Video memory to quickly read and write multiple data... Such as with blurring filters...


  A keyboard buffer is another area of memory where the keypresses are processed and sent so you can go and see what keys were pressed...

Inkey$ reads from the keyboard buffer...
Inp(96) aka Inp(&h60) reads directly from the port...

If you use Inp(96), the buffer is bypassed and you must clear it out or it will overflow and begin to beep...

Have Fun, Be Young... Code BASIC
-Josh

http://cubee.topcities.com

RE: DEF SEG ADDRESSES

what kind of buffer are you talking about?

RE: DEF SEG ADDRESSES

(OP)
why is it that I can't change the values of DEF SEG = &HFFA6
when I POKE a value to it it just changes back? Is there a way to change it? Thx for all the help so far

RE: DEF SEG ADDRESSES

That area should be controled by bios or rom...
And should not let anything change it...
It stored the Data for the ASCII characters... Such as the ones shown at startup... and Dos Prompt...

Have Fun, Be Young... Code BASIC
-Josh

http://cubee.topcities.com

RE: DEF SEG ADDRESSES

(OP)
Would there be anyway possible to change the values? And if you did would that change the all of the DOS font?

RE: DEF SEG ADDRESSES

Would there be anyway possible to change the values?
NOT THAT I KNOW OF...

And if you did would that change the all of the DOS font?
YES, IT WOULD

Have Fun, Be Young... Code BASIC
-Josh

http://cubee.topcities.com

RE: DEF SEG ADDRESSES

(OP)
Guess I'll have to go deeply into this because that would be so cool. I mean then all you would have to do is BSAVE the memory and BLOAD it so they would be actual fonts in DOS instead of that boring one. I mean anythings possible with programming after all. I mean theres gotta be a way to shutdown the security.

RE: DEF SEG ADDRESSES

...Unless the security is actually ROM...

Though, I believe Windows NT handles something differently...

Some Qbasic routines to draw Graphic fonts, using the Bios Ascii Character Map, any where on the screen tend to result in scrambled characters when you use the FFA6 segment to get the masks...

So I really don't know where the data comes from or what manages it...

If you find a work around, be sure to post it

Have Fun, Be Young... Code BASIC
-Josh

http://cubee.topcities.com

RE: DEF SEG ADDRESSES

(OP)
Well I'm pretty sure that the data is loaded when you start up the computer. And I think that if you issue any SCREEN statement it will restore the ascii segments to the original way they were so if you did manage to change it every time you use a statement in DOS to affect the screen it would change the vallues in the segment &HFFA6 back to the way they were. Like how when you change SCREENs in qbasic everything at segment &HA000 is changed back to 0. So the "font" has to be loaded when the computer is booting up I think. Well, I'll have to research it more, but there just has to be a way. Even if it means slashing up my computer with a katana (but I'm pretty sure that wouldn't work). If files can be corrupted, if a computers will crash, if tousands of errors happen to you computer each day then I know theres a way to change those stupid values. cause the DOS text is just so boring.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close