How to assemble code on the commodore PET

Other Computers and Game Systems

Moderator: Moderators

Post Reply
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

How to assemble code on the commodore PET

Post by 20questions »

Forgive me if this is in the wrong area but i have a burning question: Just how do you run assembly code on the PET, at least those with the monitor?

And for that matter, how is the code entered?

Is it entered like Vicmon, where all you have to do is put A(line number) then it keeps putting down lines until you hit enter or do i need to use the semi colon key each time per line?

anyone?
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
TMR
Vic 20 Amateur
Posts: 65
Joined: Fri Jul 01, 2005 3:00 am

Re: How to assemble code on the commodore PET

Post by TMR »

20questions wrote: Fri Jan 10, 2020 11:29 pm Forgive me if this is in the wrong area but i have a burning question: Just how do you run assembly code on the PET, at least those with the monitor?
With the SYS command from BASIC - same as the VIC, C64 or C128 - or via the monitor's G command.
20questions wrote: Fri Jan 10, 2020 11:29 pmAnd for that matter, how is the code entered?

Is it entered like Vicmon, where all you have to do is put A(line number) then it keeps putting down lines until you hit enter or do i need to use the semi colon key each time per line?
If memory serves, the ROM-based monitor doesn't have a one pass assembler - it's not a standard feature for monitors, so not all of them support that functionality - which means you can't simply type assembly language code into it. Developers back in the day either hand assembled - writing the code out on paper and manually converting it into bytes which can be written to RAM like Jeff Minter did on the PET - or using a third party tool. I can't recommend anything on that front and, because I hand assembled in the 1980s and still get the flashbacks, my automatic advice is to skip working native and look into cross assembly...
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: How to assemble code on the commodore PET

Post by 20questions »

any idea where to start? please don't say PRG studio, it's a pain to set up each time
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
TMR
Vic 20 Amateur
Posts: 65
Joined: Fri Jul 01, 2005 3:00 am

Re: How to assemble code on the commodore PET

Post by TMR »

20questions wrote: Sat Jan 11, 2020 7:57 am any idea where to start? please don't say PRG studio, it's a pain to set up each time
I don't remember it being a painful install process when testing last year - the only issue I had personally was the lack of support for tabs in source code because I'm used to navigating around with the cursor keys and that takes a lot longer if it's all spaces - and there shouldn't be any need to run it more than once anyway...?

But there are other options; I use ACME as a cross assembler for the VIC, C64, C128, 264 series, PET, Atari 2600 etc., either calling it from Crimson Editor (currently going under the Emerald Editor name until installed, I have that build on all of my PCs) or using batch files to assemble and compress code when necessary. The latter process'll work with any text editor down to and including Notepad, just plonk ACME and the batch file in the same directory as the source code.
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: How to assemble code on the commodore PET

Post by 20questions »

TMR wrote: Sat Jan 11, 2020 3:46 pm
20questions wrote: Sat Jan 11, 2020 7:57 am any idea where to start? please don't say PRG studio, it's a pain to set up each time
I don't remember it being a painful install process when testing last year - the only issue I had personally was the lack of support for tabs in source code because I'm used to navigating around with the cursor keys and that takes a lot longer if it's all spaces - and there shouldn't be any need to run it more than once anyway...?

But there are other options; I use ACME as a cross assembler for the VIC, C64, C128, 264 series, PET, Atari 2600 etc., either calling it from Crimson Editor (currently going under the Emerald Editor name until installed, I have that build on all of my PCs) or using batch files to assemble and compress code when necessary. The latter process'll work with any text editor down to and including Notepad, just plonk ACME and the batch file in the same directory as the source code.
by painful i meant setting up the emulator and getting it to run through PRG studio. it almost never works correctly. anyway, i will keep these in mind. thanks for the help :D
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
TMR
Vic 20 Amateur
Posts: 65
Joined: Fri Jul 01, 2005 3:00 am

Re: How to assemble code on the commodore PET

Post by TMR »

20questions wrote: Sat Jan 11, 2020 5:21 pmby painful i meant setting up the emulator and getting it to run through PRG studio. it almost never works correctly
I've never bothered linking like that in the past; the Crimson/ACME solution I use doesn't support it natively anyway so I just drag and drop the assembled file into the emulator. Considering this thread started because you were planning to write code in a monitor, manual testing like that shouldn't seem painful...?
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: How to assemble code on the commodore PET

Post by 20questions »

oops :oops:
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: How to assemble code on the commodore PET

Post by 20questions »

by the way, are you THAT TMR?

https://commodore64crap.wordpress.com/2 ... te-part-2/

if so, i am terribly sorry for reading your rival's work
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
TMR
Vic 20 Amateur
Posts: 65
Joined: Fri Jul 01, 2005 3:00 am

Re: How to assemble code on the commodore PET

Post by TMR »

20questions wrote: Thu Jan 16, 2020 2:26 pm by the way, are you THAT TMR?

https://commodore64crap.wordpress.com/2 ... te-part-2/
I think that's the first time it's been worded in quite that way but... yes, I'm The Magic Roundabout of Cosine/C64CD. The latter's FAQ does make the link whilst being somewhat vague, but it's due a rewrite soon to reflect a second member on the programming side of things and the widening of scope for releases.
20questions wrote: Thu Jan 16, 2020 2:26 pm if so, i am terribly sorry for reading your rival's work
It's sort of necessary to read what he says in order to give give context to C64CD's output; unless I wandered off on a tangent, what's posted there relates to something he's said even if the connection isn't always obvious. The only exceptions are when "inspiration" presents itself from another source, like one of the demos which came about due to a silly thread about piracy at Atari Age.
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: How to assemble code on the commodore PET

Post by 20questions »

well, this is amazing. I'm not a fan of him, too full of himself, but your articles are well written and very informative. I just wish this spat between you and him would end eventually, though it is fun to read. I wonder, was he ever kicked out of his apartment? if so, karma
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: How to assemble code on the commodore PET

Post by 20questions »

what is your opinion of his article about the commodore vic 20?

this one https://commodore64crap.wordpress.com/2 ... modore-64/
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
Post Reply