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?

Postby g0blinish » Tue May 01, 2018 12:19 pm

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?

Postby g0blinish » Tue May 01, 2018 12:54 pm

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
Super Gold Card
Posts: 725
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: How to start programming with assembly?

Postby pjw » Tue May 01, 2018 1:48 pm

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
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
g0blinish
ROM Dongle
Posts: 30
Joined: Mon Jun 22, 2015 11:54 am

Re: How to start programming with assembly?

Postby g0blinish » Tue May 01, 2018 2:43 pm

how to use TK2?

to type TK2_EXT?

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


User avatar
pjw
Super Gold Card
Posts: 725
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: How to start programming with assembly?

Postby pjw » Tue May 01, 2018 3:36 pm

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
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
g0blinish
ROM Dongle
Posts: 30
Joined: Mon Jun 22, 2015 11:54 am

Re: How to start programming with assembly?

Postby g0blinish » Tue May 01, 2018 3:45 pm

QL2K include TK2.ROM will try

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


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

Re: How to start programming with assembly?

Postby tofro » Tue May 01, 2018 3:56 pm

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?

Postby g0blinish » Tue May 01, 2018 4:15 pm

well, in case of qmac i see message:
Image


User avatar
pjw
Super Gold Card
Posts: 725
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: How to start programming with assembly?

Postby pjw » Tue May 01, 2018 5:12 pm

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


Per
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
User avatar
pjw
Super Gold Card
Posts: 725
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: How to start programming with assembly?

Postby pjw » Tue May 01, 2018 5:18 pm

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
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb

Who is online

Users browsing this forum: johnh and 3 guests