Here is the source code (unfortunately not finished, indeed not even one line of the real code is implemented):
Code: Select all
* SuperBASIC/SBASIC function string$ = GETLINE$(channel_number):REMark # optional
*
* Copyright (c) 2016 Dec 25, Peter Sulzer, Fuerth (Germany) - ALL RIGHTS RESERVED
* Definitions:
BP.INIT EQU $110 Initialise SuperBASIC/SBASIC PROCedures and FuNctions
SECTION CODE
* Initialise SuperBASIC/SBASIC Extensions:
LEA PROC_DEF,A1
MOVE.W BP.INIT,A2 Note: In SMS(/Q) BP.INIT has a different name
JSR (A2)
PROC_DEF
DC.W 0 No of PROCedures
DC.W 0 END of definitition of PROCedures
DC.W 1 One (1) FuNction
DC.W GETLINE-* FuNction GETLINE$(channel_number)
DC.B 8 Name of GETLINE$ is 8 characters long
DC.B 'GETLINE$' The characters (8) of GETLINE$
DC.W 0 END of definitions of FuNctions
DC.L 0 For safety (LEN(GETLINE$) is longer than 7 chars)
GETLINE
* Start below with the code of the GETLINE$() function
* START HERE WITH OUR CODE
END This signals to QMAC that this is the end
* Anything after the END directive (which doesn't produce any code) is ignored
p.s.: After some corrections (especially replacing the string delimiters from " to ') this source was assembled without errors with QMAC. Unfortunately it produces a "_rel" (relocatable object file), but I want to get a "_bin" file, so that I must not link. I have specified "-bin" in the command line - what's my fault?