GST ASSEMBLER
GST ASSEMBLER
Hi,
I am reading Colin Opie's manual on assembly progarmming, trying to make my first steps in it.
Colin referres to McGraw-Hill macro assembler, that I cannot find in the archive, so I use GST, that has slighlty different syntax, also does not support ORG directive.
I have downloaded GST_ASM and QED applications from Dilwyn's site.
I somehow modified Colin's first example as folows, I assembled the code to binary that I later load and execute from SuperBASIC, it appears to work.
Am I getting the gist of Basic ASM interraction correctly?
Many thanks
TCAT
DEMO_ASM
=======
; Demonstration assembly program
; Copies parameters passed from SuperBASIC
; Calls SD.RECOL procedure
demo: lea data(pc),a2 ; params start
move.b d2,0(a2) ; 2nd param from D2
move.b d3,1(a2) ; 3rd param from D3
move.b d4,2(a2) ; etc
move.b d5,3(a2)
move.b d6,4(a2)
move.b d7,5(a2)
move.w a0,d2 ; 8th param from A0
move.b d2,6(a2)
move.w a1,d2 ; 9th param from A1
move.b d2,7(a2)
move.l a2,a1 ; set params pointer
move.w #0,d3 ; Timeout=0
move.l d1,a0 ; Channel
move.b #$26,d0 ; SD.RECOL
trap #3 ; call QDOS
rts
data: dc.b 0
ds.b 20
end
DEMO_BAS
=======
100 REMark DEMO PROGRAM
110 :
120 REMark machine binary file
130 file$ = 'mdv2_demo_bin'
140 fl = FLEN(\file$)
150 :
160 REMark reserve space in memory
170 REMark load machine binary code
180 :
190 mc = RESPR(fl)
200 LBYTES file$, mc
210 :
220 display_circles
230 PAUSE 50
240 REMark call machine code
250 CALL mc,65537,7,6,5,4,3,2,1,0
260 PAUSE 50
270 REMark call machine code
280 CALL mc,65537,0,1,2,3,4,5,6,7
290 GO TO 230
300 :
310 DEFine PROCedure display_circles
320 INK 0: FILL 1: CIRCLE 30,60,15
330 INK 4: FILL 0: CIRCLE 60,60,15
340 INK 6: FILL 1: CIRCLE 45,30,15
350 FILL 0
360 END DEFine
I am reading Colin Opie's manual on assembly progarmming, trying to make my first steps in it.
Colin referres to McGraw-Hill macro assembler, that I cannot find in the archive, so I use GST, that has slighlty different syntax, also does not support ORG directive.
I have downloaded GST_ASM and QED applications from Dilwyn's site.
I somehow modified Colin's first example as folows, I assembled the code to binary that I later load and execute from SuperBASIC, it appears to work.
Am I getting the gist of Basic ASM interraction correctly?
Many thanks
TCAT
DEMO_ASM
=======
; Demonstration assembly program
; Copies parameters passed from SuperBASIC
; Calls SD.RECOL procedure
demo: lea data(pc),a2 ; params start
move.b d2,0(a2) ; 2nd param from D2
move.b d3,1(a2) ; 3rd param from D3
move.b d4,2(a2) ; etc
move.b d5,3(a2)
move.b d6,4(a2)
move.b d7,5(a2)
move.w a0,d2 ; 8th param from A0
move.b d2,6(a2)
move.w a1,d2 ; 9th param from A1
move.b d2,7(a2)
move.l a2,a1 ; set params pointer
move.w #0,d3 ; Timeout=0
move.l d1,a0 ; Channel
move.b #$26,d0 ; SD.RECOL
trap #3 ; call QDOS
rts
data: dc.b 0
ds.b 20
end
DEMO_BAS
=======
100 REMark DEMO PROGRAM
110 :
120 REMark machine binary file
130 file$ = 'mdv2_demo_bin'
140 fl = FLEN(\file$)
150 :
160 REMark reserve space in memory
170 REMark load machine binary code
180 :
190 mc = RESPR(fl)
200 LBYTES file$, mc
210 :
220 display_circles
230 PAUSE 50
240 REMark call machine code
250 CALL mc,65537,7,6,5,4,3,2,1,0
260 PAUSE 50
270 REMark call machine code
280 CALL mc,65537,0,1,2,3,4,5,6,7
290 GO TO 230
300 :
310 DEFine PROCedure display_circles
320 INK 0: FILL 1: CIRCLE 30,60,15
330 INK 4: FILL 0: CIRCLE 60,60,15
340 INK 6: FILL 1: CIRCLE 45,30,15
350 FILL 0
360 END DEFine
Re: GST ASSEMBLER
Hi!
And, BTW, the GST Macro Assembler is by far the most sophisticated assembler for the QL (apart from George's GWass that will, however, only run on 68020+.)
Once you've done that, explore the even wider field of assembler without SuperBASIC!
Go ahead and have more fun!
Tobias
That is, because ORG on the QL is generally not a good idea - Nearly everything in QDOS and derivates is designed to be position-independant. Just forget ORG, you will most probably not be missing it for a very long timetcat wrote: Colin referres to McGraw-Hill macro assembler, that I cannot find in the archive, so I use GST, that has slighlty different syntax, also does not support ORG directive.
And, BTW, the GST Macro Assembler is by far the most sophisticated assembler for the QL (apart from George's GWass that will, however, only run on 68020+.)
If it works, then it's all right, I'd say. I couldn't say that for my first encounters with 68k assembler many, many years agotcat wrote: I somehow modified Colin's first example as folows, I assembled the code to binary that I later load and execute from SuperBASIC, it appears to work.
Well you seem to have explored one of the many, many ways of Basic/Assembler interaction the QL supports. Next steps would be writing SuperBASIC extensions, and from there a vast area to explore spreads out.tcat wrote: Am I getting the gist of Basic ASM interraction correctly?
Once you've done that, explore the even wider field of assembler without SuperBASIC!
Go ahead and have more fun!
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: GST ASSEMBLER
Tomas Kral has emailed me about some missing files from the GST Assembler archive on the Assembler page of my website www.dilwyn.me.uk/asm/index.html (scroll down to GST-ASM). He says the three files boot, ed and info_text are missing.
Can anyone help me to provide the missing files?
GST QL software has been made freeware so no copyright issues with this.
Can anyone help me to provide the missing files?
GST QL software has been made freeware so no copyright issues with this.
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
-
- RWAP Master
- Posts: 2837
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: GST ASSEMBLER
I have sent you copies of the original GST Assembler and the Macro Assembler (including microdrive, disk and Quanta versions!)
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
- vanpeebles
- Commissario Pebbli
- Posts: 2821
- Joined: Sat Nov 20, 2010 7:13 pm
- Location: North East UK
Re: GST ASSEMBLER
All,
please be aware that the original GST Macro Assembler, Assembler, and C compiler are now Public Domain, while the Quanta Version of the Macro Assembler, to my knowledge, is not.
Maybe someone closer to Quanta than I am can verify that.
Tobias
please be aware that the original GST Macro Assembler, Assembler, and C compiler are now Public Domain, while the Quanta Version of the Macro Assembler, to my knowledge, is not.
Maybe someone closer to Quanta than I am can verify that.
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: GST ASSEMBLER
Until fairly recently it was available to members only. Then the committee took the decision to make it available (IIRC as freeware) once GST gave permission for the GST QL software to become freeware.tofro wrote:All,
please be aware that the original GST Macro Assembler, Assembler, and C compiler are now Public Domain, while the Quanta Version of the Macro Assembler, to my knowledge, is not.
Maybe someone closer to Quanta than I am can verify that.
Tobias
Anyway, Rich Mellor has kindly supplied copies of the various GST assembler packages, I just need to split up the packages and (since Rich uses QemuLator) if they need "de-QemuLatoring" to work on other systems. I'm on the case...
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
Re: GST ASSEMBLER
Ah, yes they do. Rich has zipped up the Windows folders containing the QemuLator files, which have the QemuLator modified nfa files, so I can't unzip them using normal QL Unzip as the paths are too long (hopefully QemuLator will do that by attaching the archives as drives), and they won't execute on other systems. Then I need to figure out how to remove the QemuLator mods to the files (probably just copy all the files to non-NFA drives like ramdisk or floppy), re-zip them to shorten paths and make sure no QemuLator headers creep back in....might take longer than I thought.dilwyn wrote: Anyway, Rich Mellor has kindly supplied copies of the various GST assembler packages, I just need to split up the packages and (since Rich uses QemuLator) if they need "de-QemuLatoring" to work on other systems. I'm on the case...
Even after 30 years I learn something new QL every day! Mr Navigator, would this make a helpline column for the mag, or is too specialist do you think? Would also be useful to know if the same process is needed on Mac QemuLator.
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
Re: GST ASSEMBLER
With much appreciated help from Rich Mellor, the GST QL Assembler, Macro Assembler and Quanta Q-Mac are now available to download from my website at http://www.dilwyn.me.uk/asm/index.html
The Macro Assembler is available as a floppy disk version, or a two microdrive cartridge (program and library cartridges) version.
Thomas Kral will be glad to know the editor is included now.
Manuals are also available to download as PDF files. Note that the manual for the QL Assembler is rather large by QL standards at about 10MB.
Urs Koenig got permission from GST’s founder to release GST’s QL software as freeware a little while back, and Quanta committee decided after that to allow the Q-Mac (Quanta modified version of the Macro Assembler) to be made available for all QL users (previously only available to members).
I have to explain that these packages were prepared in rather a hurry tonight as I have to get up early for work tomorrow, so I haven’t had time to test them, especially as I am not familiar with these programs, so if anyone finds problems, please let me know (e.g. missing files).
The Macro Assembler is available as a floppy disk version, or a two microdrive cartridge (program and library cartridges) version.
Thomas Kral will be glad to know the editor is included now.
Manuals are also available to download as PDF files. Note that the manual for the QL Assembler is rather large by QL standards at about 10MB.
Urs Koenig got permission from GST’s founder to release GST’s QL software as freeware a little while back, and Quanta committee decided after that to allow the Q-Mac (Quanta modified version of the Macro Assembler) to be made available for all QL users (previously only available to members).
I have to explain that these packages were prepared in rather a hurry tonight as I have to get up early for work tomorrow, so I haven’t had time to test them, especially as I am not familiar with these programs, so if anyone finds problems, please let me know (e.g. missing files).
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
- Mr_Navigator
- QL Fanatic
- Posts: 782
- Joined: Mon Dec 13, 2010 11:17 pm
- Location: UK, Essex
- Contact:
Re: GST ASSEMBLER
[quote="tcat"]
And, BTW, the GST Macro Assembler is by far the most sophisticated assembler for the QL (apart from George's GWass that will, however, only run on 68020+.)
[quote="tcat"]
OMG, having a senile moment, I have read many posts, articles, videos and spoken to George personally several times, I have only just realised what GWass stands for.....DOH!
And, BTW, the GST Macro Assembler is by far the most sophisticated assembler for the QL (apart from George's GWass that will, however, only run on 68020+.)
[quote="tcat"]
OMG, having a senile moment, I have read many posts, articles, videos and spoken to George personally several times, I have only just realised what GWass stands for.....DOH!
-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/