Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug: String Slicing (*solved*)
#4
britlion Wrote:I only ever ran it once, because it crashed and I had to reset the emulator after each run!
Incidentally, how did you run it multiple times? It should never return to basic - just scroll forever.

I recompiled with 1.2.1 and nope: still crashes.

I was using version 2 (slicing from 0) - copy and pasted exactly as I'd listed it.

Procedure:

compile test.bas to test.bin, using default org of 32768. No command line switches:

zxb test.bas

Start up Spectaculator
CLEAR 32767
load binary file into 32768
LET l=USR 32768

It cycles round the scroller about 4 times and then writes all over the screen and locks the machine.

I haven't tested the new code with BASin at this time, but on 1.2.0 yesterday it behaved exactly the same on BASIN as it did on Spectaculator, so I don't think it's an emulator issue.

Edit: Crashes identically when loaded into BASin and run, using 1.2.1.
Edit: Seems to do the behave identically same in O3 mode. I can't work out how Boriel got it to run.

Boriel: What are you testing compiled code on?
I produce .tzx files to be directly loaded (e.g. EmuzWin, Fuse, Xspect/spectemu).
The TZX or TAP already produce the basic loader and auto-executes when loaded with LOAD "".

Use the following command line:
Code:
zxb.exe --autorun --BASIC --txz test.bas
This will produce a test.tzx file to be directly opened by your emulator with LOAD "". A BASIC program comes first, later the code (Bytes: header).
I'm not sure how other emulators interpret the .bin files. BIN files are just the compiled bytes with no header info.

This should work for you. Tell me if not.

UPDATE: I'm going to test what you do with BASIN, etc.
UPDATE2: Tested on BASIN using .tzx -> Works OK
UPDATE3: Tested on Spectaculator (Demo mode) using .bin WORKS ok :?: :?:
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)