standalone bombs and runtime from editor doesnt

GFA BASIC-related articles in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2394
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

standalone bombs and runtime from editor doesnt

Postby charles » Wed Sep 05, 2018 2:51 am

hi
ive got a program which bombs once compilled,,,
but
runs fine within the editor....
and
even once compilled
runs from menu.prg ->execute....

what could be wrong ,, not that complex ,, install a timer 'a'
go into a loop while printing values to screen.

pc rel code ...
??????



Charles
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

mikro
Atari God
Atari God
Posts: 1731
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: standalone bombs and runtime from editor doesnt

Postby mikro » Wed Sep 05, 2018 6:07 am

charles, do you honestly expect that somebody answers that without you posting the code in question?

User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1236
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: standalone bombs and runtime from editor doesnt

Postby Greenious » Wed Sep 05, 2018 11:12 am

old compiler & TOS incompatibility? Tried the compiled program on a different machine/TOS?
Updated my guides as of june 28th, 2016. Check'em out and feedback!
viewtopic.php?t=5040

ThorstenOtto
Captain Atari
Captain Atari
Posts: 400
Joined: Sun Aug 03, 2014 5:54 pm

Re: standalone bombs and runtime from editor doesnt

Postby ThorstenOtto » Wed Sep 05, 2018 12:04 pm

I wrote a program that does not work. Why?

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2394
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: standalone bombs and runtime from editor doesnt

Postby charles » Wed Sep 05, 2018 1:34 pm

isn't a definite answer ..but some suggestions would help .....
I found the trouble and gfa is to blame

for a|=15 downto 0
print at(27,a|+1);a$;
next a|

in the editor ,execution is fine ,after compilation it is not !!
but as we all know ..

the gfa inner workings will continue to decrease the value for a| for the next loop around for the for/next loop
a byte is only 0-255 and cannot be negative .......

think this is a bug ????

should make a negative short byte in memory ???
however cant assign this value to the postfix '|'

btw
I haven't done a full diagnoses on this trouble ,,

but have changed to
for a|=0 to 15
and no longer bombs.......

try this code in editor
then compile and try standalone..


quik snip to illustrate

Code: Select all


LIST "a:\a.lst"
SAVE "a:\a.gfa"
'
FOR t&=0 TO 100
  FOR a|=15 DOWNTO 0
    PRINT AT(27,a|+3);STR$(a|);
  NEXT a|
NEXT t&




Charles
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2357
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: standalone bombs and runtime from editor doesnt

Postby lp » Wed Sep 05, 2018 4:09 pm

I think this is a documented bug in my gfa hypertext. Don't use byte variables in FOR loops that count backwards. Fails when compiled. Instead use word variables. Speed-wise there is no advantage to using bytes variables. Change it to word type and retest it.


Social Media

     

Return to “GFA BASIC”

Who is online

Users browsing this forum: No registered users and 3 guests