How to start programming with assembly?

Anything QL Software or Programming Related.
g0blinish
ROM Dongle
Posts: 30
Joined: Mon Jun 22, 2015 11:54 am

Re: How to start programming with assembly?

Post by g0blinish »

no, emulation stops.
QL2K emulator.


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

Re: How to start programming with assembly?

Post 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


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: How to start programming with assembly?

Post 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!


Per
dont be happy. worry
- ?
g0blinish
ROM Dongle
Posts: 30
Joined: Mon Jun 22, 2015 11:54 am

Re: How to start programming with assembly?

Post by g0blinish »

how to use TK2?

to type TK2_EXT?

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


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: How to start programming with assembly?

Post 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.


Per
dont be happy. worry
- ?
g0blinish
ROM Dongle
Posts: 30
Joined: Mon Jun 22, 2015 11:54 am

Re: How to start programming with assembly?

Post by g0blinish »

QL2K include TK2.ROM will try

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


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 »

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


ʎɐ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 »

well, in case of qmac i see message:
Image


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: How to start programming with assembly?

Post by pjw »

g0blinish wrote:well, in case of qmac i see message:<>
It does exactly as instructed. Perfect :)


Per
dont be happy. worry
- ?
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: How to start programming with assembly?

Post 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..


Per
dont be happy. worry
- ?
Post Reply