Everything related to BASIC version 1.x (Oric 1 and Atmos) or HYPERBASIC (Telestrat).
Don't hesitate to give your small program samples, technical insights, or questions...
I'm trying to replicate bas2tap (which is written in quite terrible c++ ) and since I'm Python programmer, I write it in Python of course.
Only thing I really don't understand is few bytes in tokenized basic line.
First word (2 bytes) is a starting address, but starting address of what? In bas2tap source code it's counted from 0x501 but when checking out file saved from Oricutron with hex editor starting address for first line is always 0x50F. And I never managed to match anything sensible for start address of next line. How this value should be calculated?
Since as I understood next word (2 bytes) is line number, then actual tokenized line ending to one 00 byte.
+-----+----> Address for next line ($0510)
| | +----+----> Line number (10)
| | | | +----> Token for REM
| | | | | +------------------------+----> LIGNE 10
| | | | | | | +----> End Of Line
00000501 10 05 0a 00 9d 20 4c 49 47 4e 45 20 31 30 00 |..... LIGNE 10.|
+--+----> Address for next line ($051d)
| | +----+----> Line number (20)
| | | | +----> Token for PRINT
| | | | | +-------------------+----> "TEST"
| | | | | | | +----> End Of Line
00000510 1d 05 14 00 ba 20 22 54 45 53 54 22 00 |.... "TEST"..|
+---+---> End of Program
0000051d 00 00
Got some small issues with byte ordering. For some strange reason (I blame English engineers back in the days), header addresses uses MSB format but then actual code lines uses LSB format. Ever heard of consistency..?
Also I couldn't figure out why an earth there are 2 random bytes at the end of the file...
But now journey continues and I can start to implement much higher level syntax on top of standard Oric syntax.
You're right, the header use MSB and the ROM saves BASIC programs with one more byte than necessary ($0b i, my previous post).
So the end address in the header need also to be one more than the real end of BASIC program in memory.
You can add an arbitrary byte.