several questions

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
UNCLE JACK

several questions

Post by UNCLE JACK »

1.Am looking after a "ZOOM" program to reduce at request size of letters of a program such as "EASY FONTS" for instance.Does this exist?
2.What is WIN95BAS? is it possible to get it?
3.I don't understand the differences between a "TSR" program and an interrupt program using ON KEY instruction. Basically what are those differences?
4. Is "FSET" an instruction? or just a variable name?
Thanks to answer.
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

ok, look, i cant believe im taking the time to do thiss....

i dunno if fset is or isnt a instruction, put just move ur little cursor over it, hit F1 and it will tell you.

and DONT DOUBLE POST!!! i can tell you are a noob if you didnt know about fset, but PLEASE do NOT DOUBLE POST!!! i WOULD have responded before if you had been more polite, but i am just doing this to tell you NOT TO DOUBLE POST!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :evil: :twisted:
Image
UNCLE JACK

Several questions

Post by UNCLE JACK »

Sorry if my questions appeared to be stupid:I tried to formulate them in my best english (not a must) and if I sent them several times this is because each time they didn't appear in the" hot questions" as I thought every new questions would appear and thought they were not successfully recorded.
Somebody who learns is never stupid, isn't it?
This said, I am still looking after a ZOOM program...
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

Well, thank you for being polite... I was REALLY mad when I made that post, so I was a little harsh. As for zoom, try a google search.
Image
Johnny Rebel

Nathan!!

Post by Johnny Rebel »

Nathan,i can see that u have 11 years...i i understand ur age....u are just kid and u cant flame people like that.............................!
So...be good and happy!

JR
______|

"Shall we just let them come?
Are we got whiteman on a run?
Multi-society is in a mess we take what is part of our dress"
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Re: several questions

Post by Z!re »

UNCLE JACK wrote:1.Am looking after a "ZOOM" program to reduce at request size of letters of a program such as "EASY FONTS" for instance.Does this exist?
2.What is WIN95BAS? is it possible to get it?
3.I don't understand the differences between a "TSR" program and an interrupt program using ON KEY instruction. Basically what are those differences?
4. Is "FSET" an instruction? or just a variable name?
Thanks to answer.

1) I'm not sure what you mean, a program to reduce the size of fonts?, or images?

2) I have no idea what it is, never heard of it.

3) A TSR program stays in memory after it is closed, leaving all variables and datas intact, an interrupt program changes an interrupt, and leaves the new interrupt in memory. A ON KEY program is neither, it's a "regular" program, ON KEY just means that, every cycle the program checks to see if you have pressed a certain key, and if so, jumps to the GOTO you have specified, if you close the program, the ON KEY loose all of it's effect.

4) FSET is not a built in procedure, but might be a SUB or FUNCTION in either the BAS file, or a library.



Johnny_Rebel: And you have no right to flame Nathan, so...
I have left this dump.
Uncle jack

several questions

Post by Uncle jack »

Thanks a lot to try to help me
1.yes, Iwould like to find a way to reduce ad libitum size of letters.And yes I'm ashamed to say that I don't know how to call the font program to use it in an application and place the letters where I want
2.Win95Bx is a programm available on this site or on Qb45.com
it "turns BMP into BAX (Qbasic Bsaved file format)". Unfortunately it doesn't work with the following code:
DEFINT A-Z
Screen 12
Dim Holder(2680)
DEF SEG=VARSEG (Holder(0))
BLOAD "FILESPEC",VARPTR(Holder(0))
PUT(120,232),Holder,PSET

given by the author. What is missing?The computer answers: incorrect access. "Filespac" is a bitmap image of 5360 bytes
3.I tried a TSR program and I cannot get rid of the text"your pop up is ready to run etc.Can it be canceled?
Thanks in advance for what you can tell .Except the common instructions, I find no advanced books on QBasic .
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

1) Most font programs are pretty simple, you use them soemthing like:
Font text$, x, y, col, FontFile$

(Some pre-load the fontfile so you dont have to specify it, and others read the font directly from BIOS memory)

2) When using GET and PUT (Or BSAVE., BLOAD) You need to specify 4 extra bytes in the array, for holding the dimensions of the bitmap.
Also, in screen 12, the memory used by the bitmap is higher then in screen 13.
Screen 13 is the most commonly used, and really is the best one, it's fast and has the most colors.

Look in the help, for GET and PUT, there's a section that reads (Copied from the qb helpfile):

Code: Select all

Usage Notes
    _ The GET statement transfers a screen image into the array specified
      by arrayname. The PUT statement, associated with GET, transfers the
      image stored in the array onto the screen.
    _ The following formula gives the required size of the array in bytes:

        4+INT(((x2-x1+1)*(bits-per-pixel-per-plane)+7)/8)*planes*((y2-y1)+1)

      The bits-per-pixel-per-plane and planes values depend on the
      screen mode set by the SCREEN statement.

                         Bits-per-pixel-
        Screen mode      per-plane           Planes
        -----------      ---------------     ---------------------------
         1               2                   1
         2               1                   1
         7               1                   4
         8               1                   4
         9               1                   2 (if 64K of EGA memory)
                         1                   4 (if > 64K of EGA memory)
        10               1                   2
        11               1                   1
        12               1                   4
        13               8                   1

    _ The bytes per element of an array are as follows:
          Two bytes for an integer array element.
          Four bytes for a long-integer array element.
          Four bytes for a single-precision array element.
          Eight bytes for a double-precision array element.
          Eight bytes for a currency array element.
      For example, suppose you wanted to use the GET statement to store an
      image in high resolution (SCREEN 2). If the coordinates of the upper-
      left corner of the image are (0,0), and the coordinates of the lower-
      right corner are (32,32), then the required size of the array is:
          4 + INT((33 * 1 + 7)/8) * 1 * (33), or 169 bytes.
      This means an integer array with 85 elements would be large enough
      to hold the image.
    _ Unless the array type is integer or long, the contents of an array
      after a GET operation appear meaningless when inspected directly.
      Examining or manipulating noninteger arrays that contain graphics
      images can cause run-time errors.
    _ GET and PUT statements operating on the same image should be
      executed in matching screen modes. This can be either the same screen
      mode or any screen modes with the same values for planes and bits-
      per-pixel-per-plane.
    _ One of the most useful things that can be done with GET and
      PUT statements is animation. See help for the PUT statement for
      information about how PUT arguments can be used to display a
      stored image with special effects such as animation.
A bit hard to follow, but gies the formulae to calculate the number of BYTES required to store an image in any screenmode into an array.

If you use integer arrays you take the resulting number from the formulae and divide by two (as an integer holds two bytes)


3) TSR programs run under windows start in their own DOS environment, starting program A, and then program B, will start two different VM's (Virtual machines) and the two programs will not be able to communicate.
If ou want a TSR to be started alonside another program, you need to create a BAT-file, or start them from the CMD prompt.



I'm available on MSN, feel free to add me.
I have left this dump.
Post Reply