Memotech Z80 assembler Eprom file for ZXpand

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
Moggy
Posts: 3267
Joined: Wed Jun 18, 2008 2:00 pm

Memotech Z80 assembler Eprom file for ZXpand

Post by Moggy »

Having used a copy of the Eprom code from the Memotech Z80 assembler unit with My battery backed Ram boards, I wondered if it could be used on the ZXpand.
The answer is yes, the zip file below has the p file and manual for the assembler just load "zxassem" , run said file , wait approx 45 seconds for code to be transferred to 12-16k region as per memotech Eprom (sorry the transfer is in Basic rather than m/c), then "new" the Zeddy.
If alls well then Peek 12288 should give 49, Peek 16258 (assembler entry point) should yield 42.
Follow manual from there onwards, using the Xpands CONFIG "R=nnnn" for Ramtop altering rather than poking 16388-9.
Note that with the Xpand set at "M=H" it won't work leave at default bootup setting.

I know most of You use pc assemblers/compilers but I am posting this for those who ever wondered what the rarely found Memotech assembler was like to use, so if You have a decent add on keyboard load up and have a bit of nostalgic fun. :D

Regards Moggy
Attachments
ZXASSEM.zip
(10.86 KiB) Downloaded 200 times
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Memotech Z80 assembler Eprom file for ZXpand

Post by sirmorris »

Nice one!

May I suggest a few changes which may be improvements, may be not :¬D

1. There shouldn't be any reason why you can't set RAMTOP to a value above 32k. With M=H you should be able to set this to 49152 and get away with it. Just make sure you don't push the dfile 'over the edge' ... ;) Although just leaving it at 32k will mean the assembler will automatically use the hi-ram without any user memory being eaten.

2. You can load the binary file straight to memory using the LOAD "file;address" form of the command.

Type the following program then RUN it. It will save itself - which means it will auto-run next time - then do its stuff.

Code: Select all

1 SAVE "MTXASM"
10 REM - WE WANT RAM AT 8..40K
20 CONFIG "M=L"
30 REM - THE ASSEMBLER LOADS TO 12K
40 LOAD "ASMBIN;12288"
50 PRINT "MEMOTECH ASSEMBLER LOADED."
60 NEW
If you've got the assembler's binary 'in a REM' then you can simply load your existing loader then re-save just the binary with

Code: Select all

SAVE "ASMBIN;16514,4096"
Note: Code above has been corrected as per Moggy's fine drunken testing! Mmm. Fine English beer. It's a shame it's now 6:30 AM...
Last edited by sirmorris on Wed Jun 15, 2011 7:29 am, edited 2 times in total.
Moggy
Posts: 3267
Joined: Wed Jun 18, 2008 2:00 pm

Re: Memotech Z80 assembler Eprom file for ZXpand

Post by Moggy »

sirmorris wrote:Nice one!

May I suggest a few changes which may be improvements, may be not :¬D

1. There shouldn't be any reason why you can't set RAMTOP to a value above 32k. With M=H you should be able to set this to 49152 and get away with it. Just make sure you don't push the dfile 'over the edge' ... ;)

2. You can load the binary file straight to memory using the LOAD "file;address" form of the command.

Type the following program then RUN it. It will save itself - which means it will auto-run next time - then do its stuff.

Code: Select all

1 SAVE "MTXASM"
10 CONFIG "M=H"
20 LOAD "ASMBIN;12288"
30 PRINT "MEMOTECH ASSEMBLER LOADED"
40 PRINT "RESETTING IN 5.."
50 PAUSE 250
60 CONFIG "R=40000"
If you've got the assembler's binary 'in a REM' then you can simply load your existing loader then re-save just the binary with

Code: Select all

SAVE "ASMBIN;16514.4096"
Note: I haven't tried any of this yet ;) ;)

Hi Charlie.

Many thanks for the ideas, Have tried the SAVE xxx.BIN ;16514;4096 thing before but when it come to reloading IE LOAD xxx.bin; 12288 (where it needs to be) the code loaded is different and loading back to 16514 crashes the Zeddy. :(
I have a feeling I'm missing something so I'm firing up the zeddy as I type and will give it a damn good seeing to :shock:
I have a cracking little toolkit (delphic) striped across two 2716 Eproms which work lovely on the Xpand ( it has a neat NV ram store and restore thingy) as soon as I have scanned the manual I will post that too.

Thanks again Charlie.

Regards Moggy
User avatar
Paul
Posts: 1517
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Memotech Z80 assembler Eprom file for ZXpand

Post by Paul »

I did what sir Morris suggested but not on zxpand. It worked great in eightyone.
Anybody else tried it on zxpand itself?
In theory, there is no difference between theory and practice. But, in practice, there is.
Moggy
Posts: 3267
Joined: Wed Jun 18, 2008 2:00 pm

Re: Memotech Z80 assembler Eprom file for ZXpand

Post by Moggy »

No sorry to say no joy :(

Tried saving/reloading as a bin file and whats saved is different to whats reloaded.
First 10 bytes should be 49,41,0,0,226,54,0,0,46,51 but whats reloaded is 154,13,214,196,56,249,1,236,4,254 and so on.
tried saving the rem as a p file but keep bumping into the 120 byte system variable offset, on reloading ,we discussed this once before Charlie.
Also setting M=H crashes upon loading.

Will persevere with rem and basic loader for time being as this works.

Regards Moggy
Moggy
Posts: 3267
Joined: Wed Jun 18, 2008 2:00 pm

Re: Memotech Z80 assembler Eprom file for ZXpand

Post by Moggy »

CRAP!!!

Hands up all those who didn't read the manual and put ";" where a "," should be :oops: :oops: ( damn Your lack of error trapping Charlie) ;)

Hands up all those who read Charlies last post and copied His "." where a "," should be :oops: :oops: :oops: (not just Me thats had a skinfull) :lol: :lol:

Hands up all those who pulled their finger out, stopped drinking for 10 minutes and got it right :?:

Suffice to say there is one very embarrassed Tabbycat here at the moment. :oops: :cry:

Though to be fair the M=H in the loader still doesn't work logic tells me that as it is an Eprom copy from the 8-16k area thats here the Xpand should be set, thats how it works for me anyhow so leave as default.

Ramtop not too important as long as there is enough space for labels as per manual.

Paul rest assured it works on the real thing , blame good old English beer for it not appearing to work!!

Lord Morris Thanks again for Your usual "get Moggy out of jail card"!!


( a chastened moggy crawls off for saucer of hot black coffee)

Toolkit to follow
Post Reply