Page 6 of 7

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 11:32 pm
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.

Re: How to start programming with assembly?

Posted: Wed May 02, 2018 11:24 am
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

Re: How to start programming with assembly?

Posted: Wed May 02, 2018 12:48 pm
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.

Re: How to start programming with assembly?

Posted: Wed May 02, 2018 2:04 pm
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

Re: How to start programming with assembly?

Posted: Wed May 02, 2018 2:29 pm
by g0blinish
Acording these book there are two screens 0 at $20000, 1 at $28000. How to swithc screens?

Re: How to start programming with assembly?

Posted: Wed May 02, 2018 2:56 pm
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

Re: How to start programming with assembly?

Posted: Wed May 02, 2018 5:14 pm
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

Re: How to start programming with assembly?

Posted: Fri May 04, 2018 4:57 am
by g0blinish
thank you, I found one.

how to synchronize animation?

do not understand code at dithVide-master.zip

Re: How to start programming with assembly?

Posted: Sat May 05, 2018 5:43 am
by g0blinish
found one. Here it is.

Re: How to start programming with assembly?

Posted: Sat May 05, 2018 8:50 am
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