• Please review our updated Terms and Rules here

Pet Assembler ROM file for 32k Dynamic PET

Hugo,
OK, I ran the VICE emulator in BASIC 2 (3032 PET) and it does not run with the 16K-Editor.2 or the 32K-Editor.2 just as what happens to you.

It runs fine with the C=development.d64 image in BASIC 4 mode with 32k.editor.4. It comes up with '32K Editor v121679'. I have no clue??
I hope the MAE Assembler works fine for you.

At least in this case it is not just me, normally with this sort of trouble it is.

It seems to be a real shame that the original 1979 vintage Commodore files are damaged, that dreaded compression ! Since it also appears to be quite a historical "document". Maybe the files are not damaged and we just don't know the correct address to start the Editor versions ?

Perhaps it could be repaired, though I would not know how to do it myself. Presumably, the program would have to be disassembled to figure out what has gone wrong.
 
Let's do a two pronged attack. You try the MAE Assembler version for your BASIC 2 system and see if that meets your needs. And I will troll through my floppies to see if I can find another version of the mini-Editor for BASIC 2. I will also send a message to our PET expert MikeS to see if he has copies of these files. He may also have the ROM version of the assembler that you may like better.

I can also see if my CD of the software saved by the Toronto PET Users Group (TPUG) contains this assembler. They made floppy images but did not compress the files.
 
Let's do a two pronged attack. You try the MAE Assembler version for your BASIC 2 system and see if that meets your needs. And I will troll through my floppies to see if I can find another version of the mini-Editor for BASIC 2. I will also send a message to our PET expert MikeS to see if he has copies of these files. He may also have the ROM version of the assembler that you may like better.

I can also see if my CD of the software saved by the Toronto PET Users Group (TPUG) contains this assembler. They made floppy images but did not compress the files.
That sounds like a good plan.

I do like the ROM version, if it could be found because :

1) I have the manual for it, and ....

2) I can easily program the 2532 ROMS for the UD3 and UD4 sockets, and the modified Editor ROM if required.

Also, I like it when the Software becomes Firmware and it is right there in the computer and after all, those sockets for UD3 & UD4 currently are just sitting there empty and "lonely" in my PET, begging for some company.
 
That all sounds like a plan.

Yes, you have found the image and documentation for (what is possibly) a set? Certainly what I found.

I always do my 'homework' and see if I can find the documentation and code that match (as far as can). This is always the annoying fact about software/firmware and documentation that becomes separated. Sometimes you can 'guess' how to run it. Other times you have to do a bit of disassembly to find the 'Rosetta Stone' to running it. Other time the effort is just not worth it...

Dave
 
Hugo,
I noticed that with using the 32k.editor.2 we got a READY after the SYS command. Normally that that will not happen with a bad address. It will bomb or get to the M/L monitor.

So I tried a few M/L instructions and it took them without syntax errors.
So the EDITOR may be working without the start banner. Perhaps it is an old version.

So load the editor and try this sequence of instructions:

NEW

1000 LDA #12
1010 JMP 0500
1020 .END

LIST

PUT "TEST1"

(then load the directory to see if you generated a proper SEQ file called TEST1)
LOAD "$",8
LIST

Load the file back into the editor with :
NEW
GET "TEST1"

LIST

(to exit the editor and get back to BASIC, type)
KILL

The instruction manual is basically the same as the ROM assembler you have except for the SYS addresses to start the Editor. My hard copy manual may be slightly different and match the programs you have better so I will get it into a pdf and publish it.

Good luck.
-dave_m
 
I just noticed that this assembler supports a Centronics type printer with the User Port. A hookup diagram is given. It will ask about hardcopy and if yes, prompt about IEEE port. if no, it will output on the User Port with Centronics protocol. Pretty cool. Too bad I don't have either IEEE or Centronics printer...
 
Hugo,
I noticed that with using the 32k.editor.2 we got a READY after the SYS command. Normally that that will not happen with a bad address. It will bomb or get to the M/L monitor.

Good luck.
-dave_m

Good observation. You are exactly right.....it was actually running and it works.

(leaving me wondering why I didn't think of this myself, because I had discovered before that if I sent the CPU to an "empty place" with SYS, a good example being say an empty ROM socket address, it comes up with the MLM or elsewhere in memory it locks up the computer if there is no sensible program code there)

Thank you so much for figuring this out.... but oops I spoke to soon.

Even though it saved the file as an SEQ file, it is not a proper source file. It worked I think because it was treating those address numbers as BASIC line numbers and standard BASIC saved the file.

I just double checked, it definitely is still in BASIC and is not the actual Editor running....yet.


( The MAE30 has a long list of program files, it looks more complicated than the Commodore assembler to me at least).

It says in the instructions for the mini-assembler, that after you type the SYS7*4096, it comes up with message ' MINI-EDITOR V111679' Which probably means all of these editors have an introductory message like that. It might have been in a data area near the end of the code, or maybe at the beginning. Maybe that could give a clue as to the starting address (Rosetta Stone) of the Editor, if the program code was disassembled.
 
Last edited:
The plot thickens. I think in the case of the 32k BASIC 2 Editor software, it must be damaged.

The reason is if I load the 16k BASIC 2 program and use SYS3*4096 it comes up with the Editor introductory message of 16k EDITOR V121679 , Commodore business machines etc. I got excited at first that this might be working, but it won't allow any symbolic address labels and reports a syntax error. In addition it still appears to be running a sort of corrupted form of BASIC in that you can still do things like print peek & poke memory (which I would think the text editor could not do ?) But it won't run FOR, NEXT loops it reports a syntax error for those.

Maybe I should reconfigure my PET to 16k and try again.
 
It behaved a little weird in VICE until I issued the 'NEW' command before entering code into the editor to clear pointers, etc.
Also I think you need line numbers in the editor even if a label is used.
 
Last edited:
Hugo,

As Dave has stated (and is in the documentation) you must enter a NEW command before you start entering anything into the editor.

All lines must begin with a line number when you enter your assembler source code. So, for instance:

10 NOP
20 DAVE JMP DAVE

This is on the assumption that the assembler is free-format etc. The important thing is that the line begins with a line number.

The MAE disks look more complicated than they are...

MAE/DOS is the wedge. You can run MAE without the wedge, but the wedge saves you typing! It has abbreviated commands for running the assembler, relocator etc.

There is an enhanced machine code monitor (if you wish to use it).

MAE and RELOC is the assembler and relocator.

The rest of the supplied files are library files and examples. The library files are provided to make interfacing with the BASIC ROM routines easier.

There also seems to be quite a few documentation files provided as well... This is good, as they should match the supplied code...

Dave
 
Hugo,

As Dave has stated (and is in the documentation) you must enter a NEW command before you start entering anything into the editor.

All lines must begin with a line number when you enter your assembler source code. So, for instance:

10 NOP
20 DAVE JMP DAVE

This is on the assumption that the assembler is free-format etc. The important thing is that the line begins with a line number.

The MAE disks look more complicated than they are...

MAE/DOS is the wedge. You can run MAE without the wedge, but the wedge saves you typing! It has abbreviated commands for running the assembler, relocator etc.

There is an enhanced machine code monitor (if you wish to use it).

MAE and RELOC is the assembler and relocator.

The rest of the supplied files are library files and examples. The library files are provided to make interfacing with the BASIC ROM routines easier.

There also seems to be quite a few documentation files provided as well... This is good, as they should match the supplied code...

Dave
ok, thanks, I will try using the line numbers, I did not know they were required.
 
Daver,
It sounds you can recommend the MAE even to a novice assembly programmer like me. That is good to know.
To quote a famous man with a simile;

If you think you have difficulty with assembly language programming, let me assure you that my difficulty with it is worse.

(The only novice 6502 assembly language programmer on this thread is me).
 
It had been 30 years since I had written any assembler software for a 6502. I don't know what possessed me to write my version of PETTESTER!

I am currently doing some assembler work with the 6800. This was the CPU I 'cut my teeth on' when I was a "young 'un". I find the 6502 (with its lack of a 16 bit register like the 6800) a bit of a 'hands tied behind your back'; but I also appreciate what they were trying to achieve with the 6502 CPU as well.

Right, I have to go and play with some PDP-11 computers now at work...

Dave
 
I finally got everything working today. I was able to create a file in the editor, assemble it and load and execute it. Not without a few failed attempts.

For example it looks like the Loader program has done its LOAD then returned to BASIC, but it has not in some way because the SYS command would not work. It said that it returns to BASIC at the end of the load in the manual. But if I simply looked at the disk directory again, it appears to exit the loader and gets back into full BASIC to behave normally and respond to the SYS command to execute after that. Maybe it is another case where NEW needs to be typed.

(I could not get the HI-Loader version of the loader to work, but I don't appear to need it)

To test it, I made a very simple program to start at $1000 (*=$1000), executed by typing SYS 4096, just to modify the values in the A, X and Y registers and ending with a BRK before the .END directive, so that when it was done it starts the MLM and I could see right away that the three registers had been modified correctly and the program worked.
 
Maybe it is another case where NEW needs to be typed.
Possibly, but perhaps you did not remember to KILL the Editor before you went on to the Assembler?

The original disk came with several example source files that would have made things easier for us to learn, but I did not have them.

Congrats on getting this package to work. This makes you a die-hard Commodore man as there cannot be many people still using this old Assembler.

When I get some time, I want to try the MAE program.
 
I wonder if you could help with a BASIC syntax question regarding deleting files inside directories on the SD2PET:

Using S for file scratch

OPEN 1,8,15 : PRINT#1, "S1:filename.ext" : CLOSE 1

I have been able to delete individual files from the SD card.

But, I have not figured out yet how to delete the files I have been saving which live in (and are now crowding out) the C=Development.d64 program directory, somehow the scratch cannot find them. I have tried opening the directory and doing it but no luck yet.
 
Also something has happened with the Assembler and or Loader that has baffled me.

I used the directive *= $1000 a the beginning of the assembly program.

All the program does is enter test bytes into the accumulator, X & Y registers to see if it that works and opens the TIM(MLM) to look at them.

When the Loader loads the Object, file it asks for an offset, which I specify as $0000.

So one might think it would load the program at $1000 (4096 decimal) in memory. But it doesn't.

When I tested the program, I typed SYS 4096...and it works (I cannot understand how), because oddly there are no program bytes at $1000 at all (they are all AA). The program counter in the TIM shows the program bytes start at $5000.

Somehow a $4000 address offset has been added, even though it was not requested.

But what is more baffling is why the program runs and works when I type SYS 4096, when there are no program bytes there and also works when I type SYS 20480 (=$5000) which is where the program bytes are. Maybe when the SYS command hits an AA (170 decimal) in memory, it keeps scanning upwards until it finds something else, which could explain why the program runs with typing SYS 4096. But that would still not explain why the program was not placed at $1000.

........just figured this out, the loader interpreted the address specification I used of $0000 as being equal to 4000 hex. If I specify just 0000 without the $ symbol there is no offset added.

(at least I have learnt a lesson about the way the SYS command works if it finds AA in memory)
 
Last edited:
But what is more baffling is why the program runs and works when I type SYS 4096, when there are no program bytes there and also works when I type SYS 20480 (=$5000) which is where the program bytes are. Maybe when the SYS command hits an AA (170 decimal) in memory, it keeps scanning upwards until it finds something else, which could explain why the program runs with typing SYS 4096.
The byte $AA is a TAX instruction. So it is simply transferring the ACC to the X Register for 4096 times before it finds the proper code at $5000.

I know the assembler uses decimal numbers as the default. Perhaps the '$' symbol is not correct way to specify a hex number? I wished we had the example file!
 
The byte $AA is a TAX instruction. So it is simply transferring the ACC to the X Register for 4096 times before it finds the proper code at $5000.

I know the assembler uses decimal numbers as the default. Perhaps the '$' symbol is not correct way to specify a hex number? I wished we had the example file!
Yes, how about that. The CPU just kept doing a TAX instruction from $1000 all the way up to address $5000. I guess it only worked because there was no other code along the track and BASIC had filled the memory with AA. And also helped by the TAX instruction not having any operands, a little like a NOP.

Any ideas how I could delete a file inside the directory ?
 
Back
Top