[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::atarist

Title:Atari ST, TT, & Falcon
Notice:Please read note 1.0 and its replies before posting!
Moderator:FUNYET::ANDERSON
Created:Mon Apr 04 1988
Last Modified:Tue May 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1433
Total number of notes:10312

1202.0. "GFA Basic Help" by COMICS::DSMMGR (Pigman, Pigman, ha ha charade you are...) Mon Nov 04 1991 04:49

    Hi everyone,
    
    I am delving into programming on my ST and am using GFA BAsic v2.
    
    I have written some code and if I run it using the interpreter it
    works fine. So far so good.
    
    Now if I use the compiler to create a .PRG and run that I get bombs
    (3 or 4) whenever I try to do anything in the program.
    
    My question is twofold :
    
    1. If the program runs using the interpreter would you expect it to run 
    when compiled... if not then under what conditions ?
    
    2. If there is a bug in the source code which is never accessed in
    normal use and therefore not seen when running the program using the
    interpreter, would the error cause errors in the compiled code which
    would affect code accessed in normal usage of the program ?
    
    The source code, whilst quite large does not make use of ANY fancy
    code such as GEM calls POKES or PEEKS or anything like that.
    
    Thanks for help and advice
    
    Jonathan
T.RTitleUserPersonal
Name
DateLines
1202.1take a look on the compiler optionsUFHIS::BFALKENSTEINMon Nov 04 1991 11:0311
    
    I can't tell you about V2, but in V3 you can switch compiler options
    like: - let the result be an integer whenever two integers are devided
    a.s.o. The compiled program then bombs you out when you assigned the
    result also with a x% (integer) in the source. This does not take
    affect in the interpreter, because he just sees the "%"...
    There are some more options in the V3-compiler that cause a program to
    bomb if you do not choose the right ones (e.g. malloc-stuff...).
    
    Bernd
    
1202.2On debugging programs....KERNEL::IMBIERSKIMon Nov 04 1991 12:3526
    Jonathan,
    
    your problem description is not detailed enough for anyone to make
    anything other than wild guesses at what the cause may be. The most
    common cause of a problem occurring in the compiled code but not in the
    interpreter is some kind of bad poke or addressing which occurs in both
    environments but which you somehow get away with whilst in the
    interpreter simply because your environment is different and storage
    may be laid out in a different way.
    
    The first thing to do is to put a few debugging statements into the
    program to narrow down the line of code where the failure occurs. (eg
    before each major program section put in a PRINT "About to call routine
    ....."). When you've found the routine which is failing put in more
    debug statements within that module (PRINT "About to open files..." 
    PRINT "About to do that dodgy POKE....!!!!") You can keep on narrowing
    the field down. TIP: if you have a printer then send your diagnostic
    messages there (LPRINT) rather than the screen (PRINT), since the
    output is then not lost if the screen blanks following a crash, and
    does not interrupt normal screen output from the program.) 
    
    Try to find the exact line which causes the failure, then post it here.
    You also need to find out what 3 and 4 bombs mean. They're listed in
    the GFA manual (can't remember what they are off the top of my head).
                                                                         
    Tony I
1202.3Here, i'll BOMBSUOSW3::KDIETSCHMon Nov 04 1991 14:0216
    Hi, here i'll put a list what the bombs mean:
    
    2 Bombs	=	bus error (may caused by peek,poke)
    3 Bombs	=	adress error (not even PC-counter)
    4 bombs	=	illegal instruction (may caused by wrong compiler
    			switch or linker option)
    5 bombs	=	divide by zero
    6 bombs	=	CHK-exeption (should NEVER happen)
    7 bombs	=	TRAPV-Exection
    8 bombs	=	Privileg violation
    9 bombs	=	TRACE exeption, trace without monitor
    80 bombs	=	total system crash !
    
    Hope that will help all of us
    -Kay
    
1202.4Does V2 have virtual arrays?CSOA1::FISHERThe harvest is great, but the laborers are fewWed Jan 22 1992 10:5418
    Years ago I used to write little Basic programs (both VMS and RT11)
    that used virtual arrays. What you did was open a file on disk and
    treat it exactly like you would an array in memory. Typically the
    format was something like:
    
    Open "myfile" as file #1%
    DIM #1%, A$(X%, Y%). 
    
    Now I'm trying to write a GFA V2.0 program to do some data manipulation
    that could make use of such virtual array capabilities. Much to my
    dismay GFA Basic (at least V2.0) doesn't know anything about virtual
    arrays, just memory arrays. Have I overlooked something or will I just
    have to come up with some other way of doing what I'm trying to do?
    
    Thanks,
    
    Al
    
1202.5MR4MI2::HHAMILTONBuzz HamiltonWed Jan 22 1992 12:572
I've known a few BASICs and in my experience BASIC-11 and BASIC-PLUS were the
only BASICs to implement 'virtual arrays'.
1202.6KERNEL::IMBIERSKIThe sound of electric woodThu Jan 23 1992 07:577
    I've used GFA basic V2 a fair bit and don't think there's anything there
    that will help you. HOWEVER... if you upgrade to V3 there are a couple
    of commands that load and save arrays direct to disk as a block of
    memory which avoids you having to read the array contents in record by
    record. Not quite what you want but maybe a good compromise?
    
    Tony I
1202.7GFA and resolutionUFHIS::BFALKENSTEINWed Mar 04 1992 03:1533
    
    I have a problem now, that maybe some of you solved and will no point
    me to the right direction:
    
    I am working with the MATRIX M128 Graphics Card that will give me a 
    resolution of 1280*960 pixels on a 19" monochrome monitor. When I 
    want to get the actual resolution with XBIOS(4) it still returns with
    2 (=640*400). The system is a Mega STE with TOS 2.06 and GFA 3.5 btw.
    There must be a way to get the real resolution, because other programs
    adjust just perfect to the 1280*960. How can I find out?
    
    Second, I have a GFA program incl. source that does exactly what I
    need. It worked just perfect on the SM124, but passes out on the 
    bigscreen. The problem: it uses no windows, but writes directly with
    coordinates into the 640*400 screen. Also it loads 32000bytes picture
    files from disk and displays them with SPUT. They serve as background, 
    like lines and boxes to be filled with data that is calculated by the
    program. The program also uses a lot of direct coordinates for text,
    like TEXT 230,420,string$. Is it possible to open up a window of
    640*400 (that I can move around on the bigscreen) and refer all direct
    coordinates to that window, including the display of the picture files?
    Basicly I want to redirect the screen output like it is in the moment
    into a window without changing every line in that program that uses
    direct coordinates.
    
    And my last question: how, in general, do you program resolution-
    independant programs with GFA 3.5 (main focus on higher resolutions
    than 640*400)? Is there a procedure around that does the main setup?
    
    Thanks for any answers,
    Bernd
    
    
1202.8XBIOS only for standard-featuresRTOEU::RPUCHNERHere I am...Wed Mar 04 1992 05:0216
    
    First XBIOS-Funktion doesn't work with extended computer features.
    Like the TT, XBIOS support only the resolutions 320x200,640x200 and
    640x400!
    
    If you want to use extended Graphikfeatures, you must use the VDI-
    Routines and must install extended graphikroutines like GDOS.
    VDI is a sort of routines which create/handle graphikoperations
    on all resolutions/modes. 
    
    Look at your GFA-Manual for more informations on VDI. I think there
    must be shipped a program with your MATRIX M128, which automatically
    installed extended VDI-Convertion/Features.
    
    RALF
     
1202.9Atari has written a large screen driverPOWDML::STEILWed Mar 04 1992 15:4313
    Atari has a driver for the Moniterm monitor, which is 1280 x 960. You
    might ask either Atari or Moniterm for the sources.
    
    I use the large Monitor with TOS 1.4 and a MEGA ST4. Almost all new
    Atari SW works fine with the large screen, including WHACK. Some
    older stuff works fine too, using only the top left corner of the
    screen. But there is also a fair amount of older software that is
    unuseable, e.g., WordPerfect 4.1. Timeworks Wordwriter allows only a
    small portion of the screen to be used per document, but you can have
    four of them displayed at once.
    
    Gil