# fastbasic xex

## Recommended Posts

@dmsc

fastbasic is awesome, i wish they had it in 1984 for compute! magazine.

basic:

```
0 GRAPHICS 0:DATA 0,72,74,128,200,202,0,74,72,128,202,200,0,200,202,128,72,74,0,202,200,128,74,72
1 S=PEEK(88)+256*PEEK(89):DIM C(23):FOR X=0 TO 23:READ Y:C(X)=Y:NEXT X:POKE 752,1:POKE 710,0
2 ? CHR\$(125):FOR Y=1 TO 12:FOR X=1 TO 20:F=INT(RND(0)*6):POKE S+500-X-40*Y,C(F):POKE S+499+X-40*Y,C(6+F)
3 POKE S+459+X+40*Y,C(12+F):POKE S+460-X+40*Y,C(18+F):NEXT X:NEXT Y:FOR Y=0 TO 9999:NEXT Y:GOTO 2

```

fastbasic:

```
data c()b.=0,72,74,128,200,202,
data    b.=0,74,72,128,202,200,
data    b.=0,200,202,128,72,74,
data    b.=0,202,200,128,74,72
gr.0:p.752,1:p.710,0:s=dpeek(88):do
?chr\$(125):f.y=40to480s.40:f.x=1to20
f=rand(6):p.500+s-x-y,c(f)
p.499+s+x-y,c(f+6):p.459+s+x+y,c(f+12)
p.460+s-x+y,c(f+18):n.x:n.y
f.y=0to9999:n.y:l.
```

But the xex from CTRL+W has an extra character at the top left...

...while within the IDE it is fine...

Maybe it is my mistake?  Or the emulator atari800?

Thank you

edit: this is 4.3 so could be fixed already,

Edited by thank you

##### Share on other sites
12 hours ago, thank you said:

But the xex from CTRL+W has an extra character at the top left...

It looked like the XEX was converted from ATASCII to ASCII when you extracted the XEX from the ATR after the CTRL-W, because the extra char is ASCII 10 (\$0A=line feed), and it should be ATASCII 155 (\$9B), which it must be printed after clearing screen as there is no semicolon at the end of the "?chr\$(125)" statement.

To verify that, I put your program in FastBasic 4.3 and created an XEX, then I binary-compared both XEX and I found that all ATASCII 155 where converted to ATASCII 10 (11 occurrences) and also few other bytes. The attached XEX is the uncorrupted one.

What surprises me is that your XEX works after such heavy corruption!!!

BTW, try the PAUSE statement to replace the empty FOR-NEXT loop.

##### Share on other sites

Hi!

13 hours ago, thank you said:

fastbasic is awesome, i wish they had it in 1984 for compute! magazine.

Thanks!

13 hours ago, thank you said:

But the xex from CTRL+W has an extra character at the top left...

...while within the IDE it is fine...

Maybe it is my mistake?  Or the emulator atari800?

As Vitoco said, the problem was that you converted the XEX from ATASCII to ASCII, and somehow it still works!

Mi suspicion is that you loaded the program in Atari800 from your system using "H6:ADHD.BAS", the emulator "H6:" device converts ASCII/ATASCII on the fly, compiled and saved it to the same "H6:". To save the binary you must use "H1:ADHD.XEX", the "H1:" device is the same as "H6:" but without the ASCII/ATASCII conversion.

13 hours ago, thank you said:

edit: this is 4.3 so could be fixed already,

I recommend you to use the latest beta version, so you can use the BREAK key to return to the IDE and also you help by finding bugs in that version 😛 , download it from here:

Have Fun!

##### Share on other sites

of course you guys are both right, i suspected it might be a PEBKAC

thanks @vitoco for the pause tip... i even read the manual but it went over my head to use it for this.

thanks @dmsc i will get the new beta

Edited by thank you

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.