|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
|
Thread Tools |
15th Jun 2021, 10:28 pm | #21 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,586
|
Re: Multiprocessing SCMPII on MK14
Better point out that SBASM3 is a Python script (program) so you will need Python 3 installed on your PC to run it, no matter what operating system. It's a command line utility so it has to be run either in a terminal window under Linux or in a CMD box in Windows, however it does also run OK under the IDLE Python IDE for Windows. I have not tried it with Thonny, another well known Python IDE.
If you have a Raspberry Pi, the standard Raspbian OS comes with Python 3 already installed. SBASM3 runs perfectly well in a terminal window on a Pi Zero. I think Tim has posted a number of MK14 source codes written for SBASM3 syntax in various MK14 threads so you can look at those to see what needs to be changed from the Syntax of the 'MK14 manual assembler'. |
16th Jun 2021, 12:28 pm | #22 | |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Multiprocessing SCMPII on MK14
Quote:
Code:
.LF twonkey.lis .CR scmp .TF twonkey.hex,INT CODE .EQ $0B00 DATA .EQ $0F00 .OR CODE NOP DUMMY INSTRUCTION - NOT EXECUTED START LDI /DATA STORE 1 IN LOCATION 510 XPAH 2 LDI 0XFE XPAL 2 LDI 1 ST 0(2) LDI /CODE CLEAR CYCLE COUNTER (NO OF LEVELS DOWN XPAH 2 DECISION TREE) LDI 0 EACH LOCATION IN TOP HALF OF MEMORY IS WRITTEN .... The documentation on the website is extensive, however and I had little difficulty converting the TASM code for SCIOS to SBASM although I couldn't get SCIOS to assemble due to the way address calculations are done on the SC/MP but thats another story. I keep meaning to file it as a bug report/enhancement request! |
|
18th Jun 2021, 2:59 am | #23 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
SBASM3 installed OK and seems to be working. I already had Python3 as I've been using this for a panelize tool with eagle .brd files.
Playing around a bit and it seems to allow use of PC, P1 etc by using .EQ. Code:
.LF scmp.lst .CR scmp .TF scmp.hex,INT ; Kernel of multithreaded operating system for SC/MP multiprocessor ; Entry point at 0000 so there is no need to save the contents of P3 ; This allows P3 to be used as temporary pointer within user routines ; MK14 saving pointers in RAM was big endian ; SBASM defaults to little endian, use .DR instead of .DW CODE .EQ $0000 DATA .EQ $1000 PC .EQ 0 P1 .EQ 1 P2 .EQ 2 P3 .EQ 3 .OR CODE .DB 0 ; DUMMY INSTRUCTION - NOT EXECUTED .DR $1234 ENTRY ; Entry point from reset or to call another thread/routine XPAH P3 ; If P3 == 0000 this was hardware reset JNZ FORK1 XPAH P3 XPAL P3 JNZ FORK2 XPAL P3 LD (P3) LD 8(P3) LD @8(P3) ; Reset thread table FORK1 XPAH P3 ; Restore P3 high byte XPAL P3 FORK2 XPAL P3 ; Restore P3 low byte ; (P3) contains the start address of the new thread |
18th Jun 2021, 12:28 pm | #24 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Multiprocessing SCMPII on MK14
Yes, that would work. I just mentioned it because some other SC/MP assemblers do this by default.
|
18th Jun 2021, 9:44 pm | #25 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,364
|
Re: Multiprocessing SCMPII on MK14
Also worth defining E as $80/-128 to indicate the unusual case of that offset to pointers using the Extension register...
|
21st Jun 2021, 1:41 pm | #26 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,586
|
Re: Multiprocessing SCMPII on MK14
SBASM3 puts me in mind of the old DOS PseudoSAM (TM) series of cross assemblers which I used to use quite extensively in the early nineties although I think they were old even then.
They had the same signature habit of abbreviating directives to .xx, (like ORG to .OR or DEFB to .DB) so I wonder if San Bergmans (Author of SBASM3) was also aware of those. I can't recall there having been an SC/MP / 8060 version though. As a matter of fact the Beta versions of SBASM3 did not come with an SC/MP 'cross' so I knocked one up, which worked well enough for my purposes, and sent it to San, who evidently thought I'd made such a horrible job of it that he sat down and did it properly himself and included one, written to the same standard as the others, in the final release. We may therefore have my terrible Python coding to thank for the fact that SBASM3 comes with an SC/MP cross at all. I think he just couldn't bear see it done badly. Mine was 'better' in one respect though, it assembled code written in exact MK14 manual syntax, as that had been my primary aim. I only later realised I'd missed out an entire group of instructions... One of these days (...almost certainly never) I might dig that out, finish it and 'publish' it as MK14.CR |
22nd Jun 2021, 6:18 pm | #27 |
Triode
Join Date: Jan 2021
Location: Hulst, Netherlands.
Posts: 47
|
Re: Multiprocessing SCMPII on MK14
Hello Mark,
Did you give Alfred Arnold's AS assembler a try. I found it is still upgraded, latest upgrade dates from 8-5-2021. See page http://john.ccac.rwth-aachen.de:8000/as/ I assembled Karen O's page 2 program with it, and it works great. I did not write assembler in it myself yet. I did write in SBassembler though, the tips you gave are very welcome and I hope you keep on posting them. |
22nd Jun 2021, 7:24 pm | #28 |
Tetrode
Join Date: May 2021
Location: Titz, Germany.
Posts: 72
|
Re: Multiprocessing SCMPII on MK14
And it recently got some support for the old NS syntax: After
intsyntax -0oct,+0hex,+x'hex' you can use 0ff or x'ff for hex constants. Michael |
22nd Jun 2021, 8:33 pm | #29 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,364
|
Re: Multiprocessing SCMPII on MK14
I have tried this in the past as it is used by Paul Robson so would be handy for his code but, it just fails to build on Linux - I did just try again and get the same issue. So for the moment converting code to SBASM will remain my goto!
|
22nd Jun 2021, 10:27 pm | #30 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
I'll continue with SBASM3 for now.
I did keep a copy of tasm8060.tab and tgen.c that I downloaded from Paul Robson's site quite some time ago. Unfortunately the links in the saved .htm files no longer seem to work, so maybe Paul is no longer maintaining that site. Attached a copy if anyone wants to try this with TASM |
1st Jul 2021, 3:26 am | #31 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
I have extra memory added to my MK14 now though only tested with a single processor so far. I’ve used point to point wiring on soldered proto board. Uses a header to connect into the SCMP socket on the MK14, with a socket to take the SCMP. This is then connected to an AS6C4008, but only 32K is available as 16x2K blocks filling the low 2K of every 4K page. Using a 74ls395 to latch the page address.
The RAM is battery backed using a MAX818, which also provides reset to the SCMP, though this is not able to reset the 8154. The reset input from the MK14 is connected to the watchdog input of the MAX818 via a schottky diode, so a manual reset can be performed by holding the MK14 reset for more than 1.6 seconds. The RAM was initialised with read enable disconnected and connecting write enable to NRDS. Then the MK14 is connected and exercise the various functions of the monitor. Each instruction executed is then written to RAM. Then the MK14 proms are removed, read and write enable of the RAM connected. Then on power up the monitor seems to be running from RAM. Its a bit of hassle to bootstrap if the ram is corrupted but was just an experiment to see if it would work. I still need to run a proper ram test to make sure everything is working properly. I’ll add some pictures and a schematic when I get my laptop fixed or everything installed on the new one, priority was to get the laptop running for work related software first. |
3rd Jul 2021, 7:48 am | #32 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
After bootstrapping the ram from the prom by linking write enable to nrds the MK14 then starts up with 0001 CF on the display instead of 0000 00. I was able to step through memory and verify the ram contents against the Later version listing in the manual, there were a few areas that needed to be manually loaded, for example the serial routines, as these areas of prom were not executed when exercising the monitor from the prom.
After correcting the monitor in the ram it still starts up with 0001 CF after a reset. I wonder if this might be due to decoding the 4K pages and only having the monitor at 0000. |
3rd Jul 2021, 10:50 am | #33 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,364
|
Re: Multiprocessing SCMPII on MK14
Yes it could well be as the monitor relies on the ability to wrap around as it uses the -Ve offset from 000 to get at the register values etc stored at the very top of RAM in the FF0 region...
|
3rd Jul 2021, 6:50 pm | #34 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Multiprocessing SCMPII on MK14
I was looking at the MAX818 you mention, it appears that it was made in DIP form but none of the suppliers I can find stock it. Its available on eBay (natuarally!) for huge amounts of money but I'm unwilling to use a chip costing £18 in DIP when its ~£3 in NSOIC! I'll look at my diode strategy but I do like the chip enable functionality.
Update - I found it on Mouser for ~ £5 which is more reasonable. Last edited by Slothie; 3rd Jul 2021 at 6:57 pm. Reason: Update |
3rd Jul 2021, 7:03 pm | #35 | |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
Quote:
I had looked at a few similar devices, but most of them don’t have the chip enable control in the DIP8 and the board I was working on didn’t have space to fit a DIP14. |
|
3rd Jul 2021, 7:13 pm | #36 | |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
Quote:
I might try connecting reset of the 74LS395 to ground instead of pulled up to see if that confirms the reason for the starting at 0001 CF is due to addressing in the monitor. |
|
3rd Jul 2021, 7:17 pm | #37 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
|
3rd Jul 2021, 8:25 pm | #38 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
I think there is an assembly error in the SCIOS v2 monitor in the manual.
At the end of the listing in ABRT, LDI L(ABORT)-1 is assembled as C442, but the ABORT label is at 004C. |
3rd Jul 2021, 10:42 pm | #39 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,586
|
Re: Multiprocessing SCMPII on MK14
When trying to convert some of the listings in the MK14 manual to SBASM3 format I discovered that some would not directly assemble, or would not reproduce the original hex code verbatim, because of errors. There was a strong feeling that the programs in the manual had never been within sight of an actual assembler and had instead been hand-assembled and typed.
|
4th Jul 2021, 5:45 am | #40 |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,298
|
Re: Multiprocessing SCMPII on MK14
I was going to try changing the 42 to 4B to see if it made any difference, though looking at the extra code that is executed by the jump to 43 it didn’t look like it would make any difference.
I thought I’d test first to confirm the fault and it powered up correctly as 0000 00. Reset a few times and still ok, then after a while it started to show 0001 CF, intermittently at first but then consistent. By Touching the pins on the 8060 with my finger I could get it to power up correctly. Then narrowed this down to pin 39 by touching the pin with tweezers. NADS is supposed to be a standard output, but it looks like it might need a pull up resistor to drive the clock on the 74LS395. I’ll take a look with the scope first to get a better understanding of what might be happening. |