RESTARTING in 68K Assembler for QDOS
Posted: Sun Dec 25, 2016 4:38 am
As no toolkit or SB-extension fullfills my requirements for a SuperBASIC extension to read a line fully, I have now started to (re)learn programming in 68k Assembler for QDOS. I have installed QMAC (the QUANTA version - which I have bought formerly - I was a QUANTA member- from Dilwyns page). Below there's a screenshot of what I did so far:

Here is the source code (unfortunately not finished, indeed not even one line of the real code is implemented):
It was, albeit I have programmed a lot of SB-Extensions in my old QDOS days, quite difficult after so much years. So I would be pleased, if you could tell me, if the above code is (PRINCIPALLY) correct.
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?

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?