Problem with parameter to a SuperBASIC machine code extension

Anything QL Software or Programming Related.
User avatar
pjw
QL Wafer Drive
Posts: 1656
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Problem with parameter to a SuperBASIC machine code extension

Post by pjw »

BSJR wrote: Fri Sep 05, 2025 10:38 am <>
I write all my numberless Basic in QD and use F10-"sbas/qd" to parse and test run it from there.
BasicLinker will produce from that a numbered SBasic file and error reports.
The numbers are only needed & helpful to get BasicLinker to point my QD to the error line.
When no more errors are reported BasicLinker can then call QLib to produce the _obj file as well.
A _ctrl text can link several bin & SBasic modules together making the process mostly automatic.

BSJR
Quite. In QD you just write line numberless code. Its simple enough to
merge code (with or without line numbers as these can be quickly removed
with two keypresses) or copy and paste, either from another QD or directly
from Windows or Linux via the clipboard). With the SBAS/QD Thing installed,
to test the code press F10. Single step line numbers are invisibly entered
and the program executes. If there is an error, the normal error message is
displayed in an acknowledge menu and the line that caused the error becomes
the top line in the QD editor.

There is no syntax highlighting or real-time syntax checking, but that is
not something I miss. Occasionally I still use SBASIC's ED to test
subroutines and then merge them into the main program opnce they work. Like
with SSB, I use lots of library code which is easily merged as needed.

Intermediary utilities I have written and attached via FileInfo2
transparently compile the code with Qlib, or execute the line numberless
code directly from QPAC2 Files (or any other FI2-aware file manager,) or
convert the code into syntax-highlighted, navigable HTML, which makes it
easy to follow the code, visit subroutines etc. Most of these tools are
available off knoware.no.

The latest addition to my toolbox is a tool to automatically build ad hoc
toolkits based on the requirements of the particular program being
developed, avoiding having to add vast bloated all-purpose-plus-the-
kitchen-sink toolkits, or fiddle around building linker files and resolving
dependencies manually. This tool works for me, but at present isnt fit for
general consumption. My motivation for producing publicly available
programs is now at an all time low so it may never escape the knoware labs.


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
User avatar
ql_freak
Super Gold Card
Posts: 600
Joined: Sun Jan 18, 2015 1:29 am

Re: Problem with parameter to a SuperBASIC machine code extension

Post by ql_freak »

I didn't know about Wolfang's "Basic Linker" until now. Sounds very interesting.

BTW: If I will have finished (if I succeed) the missing function (which will support a special kind of GO TO/GO SUB) of my reflection toolkit, I will have a look at MicroEMACS (it was my first Windows GUI editor and I have had written a lot of extensions for it, e.g. a block with copy/move block as common in QL editors). Perhaps it is possible to write EMACS extensions which allow realtime syntax checking of SuperBASIC in EMACS (as in ED). Of course with the help of (e.g.) a (two) PIPE(s) and a MultiBASIC (SBASIC) job (I won't write a SB-Parser!).


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
Post Reply