Login
Forum Help



Post Your Message
Username: (Login)

Topic:
Message:
 


Previous Messages
Posted By

MMS
on 2024-12-22
06:56:19
 Re: Preic BASIC source pre-processing tool

I really like this approach, and superb as we knew everything from Rachy happy

This code looks like a great Turbo Pascal OR Turbo C code I really liked; the hexa conversion to decimal on the fly is priceless instead of the DEC("ABCD"), I havte using the Decimal values of known and easy to remember addresses like $1800 ($$1800 NOW)

Posted By

Rachy
on 2024-12-21
02:00:14
 Re: Preic BASIC source pre-processing tool

New release is out: v1.1.0

https://github.com/almosr/preic/releases/tag/v1.1.0

Added

Optional command line parameter -ld for specifying source library directory.
Optimisation r for removing REM commands from source code.
Processing flag $ for converting hexadecimal numbers to decimal in the source code.

Changed

When literal label is located at the beginning of the line, but not followed by equal sign then it is considered a
label usage instead of definition and processing doesn't throw an error.
Literal labels can be embedded into each other to create more complex structures, infinite recursion is detected.

Fixed

Handling of one character variable names, previously these names could cause processing errors.
Join line optimisation when a line started with a label then it was joined with the next line if that did not start
with a label.

Posted By

Rachy
on 2024-12-12
02:49:24
 Re: Preic BASIC source pre-processing tool

Interesting, I didn't need such tool before, although it should be possible, just like a disassembler. However, exactly like disassembly, making BASIC code more understandable is not trivial.

I leave this to someone else. The petcat tool is a useful start, it could turn BASIC program into source code text. (So, it is working both directions.)

Posted By

Crown
on 2024-12-12
02:43:36
 Re: Preic BASIC source pre-processing tool

Great, doing the other direction might be also worth considering: ie. from existing hard to read BASIC code -> to generate beautified easy to read BASIC source. Some of the steps could be automated but some might need a manually assisted process, like picking variable names or breaking up into multiple files.

Posted By

Rachy
on 2024-12-12
02:05:22
 Preic BASIC source pre-processing tool

My new project is ripe for public introduction:

https://github.com/almosr/preic

Preic is a tool that makes cross-developing Commodore BASIC programs a lot easier. For the details have a look at the link.

A little game is included in the project as an example, working on both C16/116/Plus/4 and C64. Maybe I publish that separately.


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon