How to start programming with assembly?

Anything QL Software or Programming Related.
User avatar
janbredenbeek
Super Gold Card
Posts: 629
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: How to start programming with assembly?

Post by janbredenbeek »

g0blinish wrote:QL2K include TK2.ROM will try

Will read Qmac manual, I think aligning directive must exist.
This was one of the bugs fixed in Qmac compared to the original GST assembler.
A DS.W 1 at the end had no effect and in fact it could produce binaries with odd length - embarrassing when you tried to EXEC these!
CALL should work OK from JS onwards or JM with TK2 fitted.
The UT_MTEXT vector prints the message on SuperBASIC's channel 0 or 1 if channel 0 is in use (which might be the case when you use EX rather than EW).

Jan.


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: How to start programming with assembly?

Post by RWAP »

Just a note that one of the better guides to starting with Assembly programming on the QL is now available on SellMyRetro - The Sinclair QDOS Companion was my first go to book when I was starting out.

https://www.sellmyretro.com/offer/detai ... nell-32017


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: How to start programming with assembly?

Post by NormanDunbar »

RWAP wrote:Just a note that one of the better guides to starting with Assembly programming on the QL is now available on SellMyRetro - The Sinclair QDOS Companion was my first go to book when I was starting out.

https://www.sellmyretro.com/offer/detai ... nell-32017
Yes indeed, this was my first book on the matter too, this plus the QDOS Companion by the same author. I still use both to this day. Mind you, my original QDOS companion has - like many Sunshine Books - gone crumbly on the spine where the glue has deteriorated and I now have the equivalent of a loose leaf version! Actually, these books are so old that the glue on the sticky tape I used to fix the problem in the past, brand name too, not cheap equivalent, has also deteriorated! I have numerous bits of cellophane now as bookmarks!

Other good books on assembly language programming are also available, once you have purchased the linked book by Andy Pennell, for example:

http://qdosmsq.dunbar-it.co.uk/download ... sembly.pdf

And the Assembly Language Programming ePeriodical too:

http://qdosmsq.dunbar-it.co.uk/download ... yLanguage/

Blowing my own trumpet? Me? Surely not! :o

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: How to start programming with assembly?

Post by tofro »

Just to blow your trumpet a bit more:

I really consider your books as
RWAP wrote: some of the better guides to starting with Assembly programming on the QL
Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
g0blinish
ROM Dongle
Posts: 30
Joined: Mon Jun 22, 2015 11:54 am

Re: How to start programming with assembly?

Post by g0blinish »

Acording these book there are two screens 0 at $20000, 1 at $28000. How to swithc screens?


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: How to start programming with assembly?

Post by tofro »

g0blinish wrote:Acording these book there are two screens 0 at $20000, 1 at $28000. How to swithc screens?
Thats in another book you want to have on your shelf:

http://www.dilwyn.me.uk/docs/manuals/qltm.pdf

The QL Technical guide has (amongst the complete QDOS reference) also some hardware register explanations. The second screen is a bit tricky to use without Minerva, because QDOS locates the system variables there. Programs that go in Supervisor mode and practically disable the OS can use that second screen, though. Minerva optionally moves the System Variables out of the way.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
dex
Gold Card
Posts: 286
Joined: Thu Dec 23, 2010 1:40 pm

Re: How to start programming with assembly?

Post by dex »

g0blinish wrote:Acording these book there are two screens 0 at $20000, 1 at $28000. How to swithc screens?
See this (it uses two VRAMs):
https://github.com/SinclairQL/dithVide


g0blinish
ROM Dongle
Posts: 30
Joined: Mon Jun 22, 2015 11:54 am

Re: How to start programming with assembly?

Post by g0blinish »

thank you, I found one.

how to synchronize animation?

do not understand code at dithVide-master.zip


g0blinish
ROM Dongle
Posts: 30
Joined: Mon Jun 22, 2015 11:54 am

Re: How to start programming with assembly?

Post by g0blinish »

found one. Here it is.
Attachments
_rel.zip
(1.61 KiB) Downloaded 132 times


User avatar
dex
Gold Card
Posts: 286
Joined: Thu Dec 23, 2010 1:40 pm

Re: How to start programming with assembly?

Post by dex »

g0blinish wrote:thank you, I found one.

how to synchronize animation?

do not understand code at dithVide-master.zip
Explained here:
https://omega.webnode.com/products/product-2/
and here:
https://omega.webnode.com/products/sinc ... ithvide-2/

"boot" is a Basic loader: loads two pictures 1_dvd and 2_dvd (can be in different modes), calls dvdrv_bin to switch between them (and the mode, if necessary) every frame.
Source of switching routine is in dvdrv_asm:

sv_base equ $28000 system vars base - this requires change, as it runs with old QDOS only, not in Minerva / SMSQ/E!

the most important code is probably this:
; Link interrupt handler to the polled list
; as there will be a single entry only in the list
; we move handler to sv_plist, now part of second screen vram2
; this trails a small pattern at the top of the screen

...

lnk_flip lea flipper,a0 ;Link element =next,vector
movea.l modes(pc,d1.w),a2 ;Select vector =modes[d1]
move.l a2,4(a0) ;Fill in vector address
move.l a0,sv_plist ;Link it to the polled list
andi.w #$f8ff,sr ;Enable interrupts


Post Reply