01-26-2004, 01:44 AM
How do you print text using PEEK/POKE in SCREEN 13?
:???:
:???:
A short PEEK/POKE question
|
01-26-2004, 01:44 AM
How do you print text using PEEK/POKE in SCREEN 13?
:???:
01-26-2004, 03:24 AM
You can POKE pixels, but not text in graphical modes. But you can do that with text only modes like SCREEN 0.
The closest you can get (in a graphical mode) is PEEKing from the BIOS font and POKEing to the screen, like some font programs do.
01-26-2004, 03:40 AM
This may be of some help to you.
First of all you need to know the SEG address that you wish to read from. If you already know that then you just need to write: PRINT PEEK(N). With N being the the address of the first bite of info. you wish to print. Here is a rough example. Lets say you have 500 bites information "poked" into memory at address 25000. To print it out you would just use: FOR N is 25000 to 25499: PRINT PEEK(n);: NEXT. I don't recall the complete procedure you need to use now with qbasic except that you use the same DEF SEG to set the address for both the POKE and PEEK. I know that there are others on this forum that can fill you in on any and all of the details I probably missed. It's been awhile since I've used that format.
adsherm
01-26-2004, 04:08 AM
I tried using this code:
Code: DEF SEG = &HB800 It works on the default screen (SCREEN 0) but it doesn't work on screen 13. This one uses B800h as the segment but I think screen 13 uses a differnt segment.
01-26-2004, 04:41 AM
I found these two programs using google. I think FFA6h is the right segment. Can someone explane how any of these programs work?
Code: DEFINT A-Z Code: DEF SEG = &HFFA6 'Stores masks for letters
01-26-2004, 08:27 AM
It's just like I said earlier. That code is copying pixels from the BIOS font to the screen.
01-28-2004, 05:44 PM
Quote:It works on the default screen (SCREEN 0) but it doesn't work on screen 13. This one uses B800h as the segment but I think screen 13 uses a differnt segment.Screen 13 segment: A000h . Storage struct: one byte per pixel, namely the pixel colour. To calculate x/y coordinates to offset: Code: x% = 160 |
« Next Oldest | Next Newest »
|