How to start programming with assembly?

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

Re: How to start programming with assembly?

Postby janbredenbeek » Tue May 01, 2018 11:32 pm

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: 2663
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: How to start programming with assembly?

Postby RWAP » Wed May 02, 2018 11:24 am

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
Aurora
Posts: 791
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: How to start programming with assembly?

Postby NormanDunbar » Wed May 02, 2018 12:48 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
tofro
QL Wafer Drive
Posts: 1712
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: How to start programming with assembly?

Postby tofro » Wed May 02, 2018 2:04 pm

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?

Postby g0blinish » Wed May 02, 2018 2:29 pm

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


User avatar
tofro
QL Wafer Drive
Posts: 1712
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: How to start programming with assembly?

Postby tofro » Wed May 02, 2018 2:56 pm

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
Trump Card
Posts: 211
Joined: Thu Dec 23, 2010 1:40 pm

Re: How to start programming with assembly?

Postby dex » Wed May 02, 2018 5:14 pm

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?

Postby g0blinish » Fri May 04, 2018 4:57 am

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?

Postby g0blinish » Sat May 05, 2018 5:43 am

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


User avatar
dex
Trump Card
Posts: 211
Joined: Thu Dec 23, 2010 1:40 pm

Re: How to start programming with assembly?

Postby dex » Sat May 05, 2018 8:50 am

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



Who is online

Users browsing this forum: No registered users and 4 guests