Page 5 of 7

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 12:19 pm
by g0blinish
no, emulation stops.
QL2K emulator.

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 12:54 pm
by g0blinish
yay\o/ it works! I compile provided code with qmac, and text prints!


thank you very much for the help. Ifound some examples about graphics, hope code will work.

thank you again

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 1:48 pm
by pjw
g0blinish wrote:no, emulation stops.
QL2K emulator.
If you are referring to to my posting above: Either you are not using TK2. (There is a bug in the Qdos CALL command which may affect the execution of the routine above, the details of which I no longer recall.) Or the assembler you used produces different results to Qmac (see a previous post on this topic on alignment issues) Finally: There is some problem with QL2K or other software in use!
Just to make sure Im not talking through my hat: I copied the assembler code above. Assembled it with Qmac (under QPC2). Copied it to somewhere accessible by Q-emulator. Fired Q-emulator up with Qdos JS + TK2. Loaded and CALLed the code. It works as advertised!

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 2:43 pm
by g0blinish
how to use TK2?

to type TK2_EXT?

and I didn't understand: word-aligned - by size or by address?

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 3:36 pm
by pjw
g0blinish wrote:how to use TK2?

to type TK2_EXT?
Its so long since I tried QL2K I couldnt say, but you should always be able to LBYTES TK2. Get the latest version from Dilwyn's website. Some emulators let you attach ROM version of TK2 as a ROM. There is probably no particular advantage in doing this on an emulator other than have TK2 available immediately on start.
After booting you could first try typing EXTRAS at the console. If the system responds with a list of extra commands, then there should be no need to type TK2_EXT. If it doesnt, then you do.

QPC2 and SMSQmulator (both free!) run SMSQ/E - the best, most inclusive, and most advanced version of "Qdos". They also sport high colour and lots of different resolutions. TK2 is part of these systems; no need to do anything.

Q-emulator can also run SMSQ/E, but requires a bit of know-how and effort. Q-emulator is shareware. Its main advantage (apart from being very good) is that it runs most versions of Qdos, runs on a variety of platforms, and is reasonably well supported by its author.

and I didn't understand: word-aligned - by size or by address?
MC68 CPUs < 68020 dont support odd addresses for word and longword operations, so one must always ensure that such addresses are "word-aligned", ie start on an even address. It is a good idea to stick to this restriction for any code you wish to be compatible with the original QL hardware - and most emulators.

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 3:45 pm
by g0blinish
QL2K include TK2.ROM will try

Will read Qmac manual, I think aligning directive must exist.

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 3:56 pm
by tofro
pjw wrote:
g0blinish wrote:QPC2 and SMSQmulator (both free!) run SMSQ/E - the best, most inclusive, and most advanced version of "Qdos". They also sport high colour and lots of different resolutions. TK2 is part of these systems; no need to do anything.


Agree on SMSQ/E hails, but one caveat:

The Window Manager in SMSQ/E will most probably restore all buried windows after your program has ended - So, you won't see anything. SMSQ/E programs should wait for a keypress at the end to keep the program windows alive.

Tobias

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 4:15 pm
by g0blinish
well, in case of qmac i see message:
Image

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 5:12 pm
by pjw
g0blinish wrote:well, in case of qmac i see message:<>
It does exactly as instructed. Perfect :)

Re: How to start programming with assembly?

Posted: Tue May 01, 2018 5:18 pm
by pjw
tofro wrote:
pjw wrote:
g0blinish wrote:QPC2 and SMSQmulator (both free!) run SMSQ/E - the best, most inclusive, and most advanced version of "Qdos". They also sport high colour and lots of different resolutions. TK2 is part of these systems; no need to do anything.


Agree on SMSQ/E hails, but one caveat:

The Window Manager in SMSQ/E will most probably restore all buried windows after your program has ended - So, you won't see anything. SMSQ/E programs should wait for a keypress at the end to keep the program windows alive.
Doesnt apply to the example given here though, provided the system console is not asleep. This routine will always print to system channel 0, which happens to coincide with S*BASIC channel#0..