Topics

Noob question: examine arbitrary memory address? #ELF #memory


John Kennedy
 

Is it possible to examine the contents of an arbitrary memory address, without pressing the IN button multiple times? I’d like to check if a ROM I am programming is where I think it is - but pressing IN 32768 times seems a little tedious.


Lee Hart
 

John Kennedy wrote:
Is it possible to examine the contents of an arbitrary memory address,
without pressing the IN button multiple times? I’d like to check if a
ROM I am programming is where I think it is - but pressing IN 32768
times seems a little tedious.
Hi John,

It's not hard to do, but how it's done depends on what Elf you are using.

If it's an 1802 Membership Card, the easy way is have the U2-LO jumper in place. That puts the ROM at address 0, so the front panel LOAD mode can easily read sequential locations starting at 0.

For other Elfs, you can figure out the address decoding to to the same; i.e. move the EPROM to 0.

Or, if you have RAM at 0 and the ROM is at 32768, you can write a little program that sets a register to 8000h (32768 decimal), and uses that register to read memory and display its contents. Then have each press of the IN button advance the address.

Lee Hart

--
A designer knows he has achieved perfection not when there is
nothing left to add, but when there is nothing left to take away.
-- Antoine de Saint Exupery
--
Lee Hart, 814 8th Ave N, Sartell MN 56377, www.sunrise-ev.com


David Schultz
 

On 9/14/20 7:59 PM, John Kennedy wrote:
Is it possible to examine the contents of an arbitrary memory address,
without pressing the IN button multiple times? I’d like to check if a
ROM I am programming is where I think it is - but pressing IN 32768
times seems a little tedious.
There was a program for the original Elf called ETOPS but that was
limited to 8 bit addresses. Surely someone besides me must have extended
it to 16 bits by now.

--
http://davesrocketworks.com
David Schultz


the-eagle@att.net
 

John,

    Here is a simple program that will display the ROM byte by byte to the Membership Cards
LED's using the IN push button.
                  
                        
   0000   90            INIT    GHI    R0
   0001   a2                      PLO    R2
   0002   f8 80                  LDI    80H
   0004   b2                      PHI    R2    ;R2 points to memory to display
   0005   e2                      SEX    R2    ;set X=2
   0006   64            NEXT OUT    4    ;output byte to LED's
   0007   3f 07                  BN4    $-0    ;wait for IN key depression
   0009   37 09                 B4    $-0    ;wait for IN release
   000b   30 06                 BR    NEXT    ;get next byte to output
                        
Chuck


John Kennedy
 

Thanks Lee. I’m afraid I don’t have the MC (yet) and this is a RC1802 system.
I would like to explore the memory map, rather than stick the ROM at 0000, so writing a program looks like the way! Thanks for the pointer!

BTW, I’m guessing with a 1Mhz clock I’m not going to have much luck with a serial port, am I?

-john


John Kennedy
 

Thanks Chuck. Time to learn 1802! :-)


Lee Hart
 

John Kennedy wrote:
Thanks Lee. I’m afraid I don’t have the MC (yet) and this is a RC1802
system. I would like to explore the memory map, rather than stick the ROM
at 0000, so writing a program looks like the way! Thanks for the pointer!
You're most welcome. For a software solution, Chuck's program (posted earlier today) will quickly get you going. :-)

BTW, I’m guessing with a 1Mhz clock I’m not going to have much luck with
a serial port, am I?
That's no problem at all, John. The 1802 can easily bit-bang high baud rates even with a 1 MHz clock.

The old RCA UT4 (or IDIOT4) monitor will bit-bang to 1200 baud, and newer programs like Chuck Yakym's MCSMP20 monitor will do 4800 baud.

Lee Hart

--
A designer knows he has achieved perfection not when there is
nothing left to add, but when there is nothing left to take away.
-- Antoine de Saint Exupery
--
Lee Hart, 814 8th Ave N, Sartell MN 56377, www.sunrise-ev.com


joshbensadon
 

John,

The worse part of pressing IN 32K times is by the time you get to 31559, the phone rings with a wrong number asking for 31669... oh crap! 1, 2, 3....

Chucks code is the perfect way to do it and learn a bit of coding while at it.

In case you haven't already, please read Popular Electronics COSMAC ELF article 1.  Aug 1976.  
It was written by Joseph Weisbecker, the creator of the 1802.  He did an amazing job at writing that article, explaining without all the clutter.  

You can download it by searching for it.  Or download a scan of the whole magazine at www.americanradiohistory.com
Go to Technical/Engineering then Consumer Electronics.  There you can spend months reading back issues, but if you would like a quick list of selected articles, try Rich Cini's site at http://www.classiccmp.org/cini/mags.htm

Cheers,
Josh






From: cosmacelf@groups.io <cosmacelf@groups.io> on behalf of John Kennedy <johntkennedy@...>
Sent: Monday, September 14, 2020 8:59 PM
To: cosmacelf@groups.io <cosmacelf@groups.io>
Subject: [cosmacelf] Noob question: examine arbitrary memory address? #ELF #Memory
 
Is it possible to examine the contents of an arbitrary memory address, without pressing the IN button multiple times? I’d like to check if a ROM I am programming is where I think it is - but pressing IN 32768 times seems a little tedious.


John Kennedy
 

Thanks all. I believe I have grok’d the way memory is laid out now. I’ve made an EPROM with blinking Q code and can call it where I can expect it! Next step is a monitor program. So far the serial loop back code works (all six bytes!) but the IDIOT isn’t doing anything so I’ve plenty more to work on.


thinkpast
 

John Kennedy wrote:

Thanks all. I believe I have grok’d the way memory is laid out now. I’ve
made an EPROM with blinking Q code and can call it where I can expect it! Next
step is a monitor program. So far the serial loop back code works (all six
bytes!) but the IDIOT isn’t doing anything so I’ve plenty more to work on.
http://www.retrotechnology.com/memship/mship_test.html

has a bunch of 1802 MC test programs and little exercisers of the 1802 and one's progamming skills. The last program, is Lee Hart's attempt to write a front-panel monitor which only uses the front panel. So this answers the question of how to read arbitrary memory from a typical ELF front panel. One writes a program to read the toggle switches, does a thing, and display a result on the LEDs. How about, somebody finishes this program?

> but the IDIOT isn’t doing anything

Chances are the problem is that IDIOT is producing the wrong bits or reading the wrong bits. But there can be other problems, like baud rates. Read the fine Web pages:

http://www.retrotechnology.com/memship/mship_idiot.html
http://www.retrotechnology.com/memship/idiot_ramrom.html

A simple answer to how to operate Q and EF3 with IDIOT to match one's actual serial hardware, is to program a ROM with ALL FOUR WAYS, and then try each program. Put IDIOT in high memory and jump to each of four ways and see what happens. Kinda brute force but ROMS are much bigger than the 512 byte IDIOT monitor.

The simple test programs for EF3 and Q plus the Q LED display (in that first Web page I mentioned) can tell you (with a few tools and some head-scratching) what your external computer is expecting on its serial lines.

All these things, are ways one learns about these things and about the 1802. This is one reason ELF like microcomputers continue to be popular.

Regards, Herb Johnson


John Kennedy
 

Thanks Herb! 

I’ve been using your excellent pages for a few days now. And I’ve done exactly what you describe - first used the loop back, and then burned the IDIOT with variations into an ROM and tried them all. Loop back works, which gives me hope I’m on the right track and I’m just missing something - e.g. baud rates - and need to keep experimenting. Thanks!


Lee Hart
 

From: John Kennedy <@GrantMeStrength>
Thanks Herb!

I’ve been using your excellent pages for a few days now. And I’ve done exactly what you describe - first used the loop back, and then burned the IDIOT with variations into an ROM and tried them all. Loop back works, which gives me hope I’m on the right track and I’m just missing something - e.g. baud rates - and need to keep experimenting. Thanks!
A few hints with IDIOT that might help:

1. It was written in the days of teletypes, and so expects a low baud rate. Try 110, 300, or 1200 baud.

2. It expects 7-bit (not 8-bit) data.

3. Be sure your terminal program is not using hardware or software handshaking.

Lee


--
Excellence does not require perfection. -- Henry James
--
Lee A. Hart http://www.sunrise-ev.com


John Kennedy
 
Edited

Well the IDIOT ran once! Not sure what I did exactly, but for a few fleeting minutes I was an 8-bit hero :-)
I need to find the magic spells that will let me repeat it..


joshbensadon
 

John, that is great.  Reminds me of some old saying, everything is hard before it becomes easy.  Edison (or one of his fellow inventors) said 1% inspiration and 99% perspiration.




From: cosmacelf@groups.io <cosmacelf@groups.io> on behalf of John Kennedy <johntkennedy@...>
Sent: Thursday, September 17, 2020 1:17 AM
To: cosmacelf@groups.io <cosmacelf@groups.io>
Subject: Re: [cosmacelf] Noob question: examine arbitrary memory address? #ELF #Memory
 

[Edited Message Follows]

Well the IDIOT ran once! Not sure what I did exactly, but for a few fleeting minutes I was an 8-bit hero :-)
I need to find the magic spells that will let me repeat it..


Lee Hart
 

From: John Kennedy <@GrantMeStrength>
Well the IDIOT ran once! Not sure what I did exactly, but for a few
fleeting minutes I was an 8-bit hero :-) I need to find the magic spells
that will let me repeat it..
Congratulations! Well, if you did it once, you can do it again. It's just a matter of figuring out exactly what you did differently when it worked. :-)

I know... easier said than done. I'm reminded of a cartoon. A huge computer isn't working, and dozens of technicians are scrambling all over it, trying to find the problem. No one notices the cleaning lady, who has unplugged a cord so she could plug in her vacuum cleaner...

Lee


--
Excellence does not require perfection. -- Henry James
--
Lee A. Hart http://www.sunrise-ev.com


John Kennedy
 

If the loop back works, proving the physically connections are working, but nothing is ever sent to the TX pin (as measured on the ‘scope), does that imply the monitor software is still in the loop trying to calculate the baud rate?


joshbensadon
 

I believe random crashing is never really random, we just simply can't see the cause.  So far, my favorite hair pulling trouble shooting story has been the one where someone could not enter 00 into the ELF.  Any other value worked fine.  In the end, it turned out to be 5V was not connected to pin 16 (or 40).  

Sometimes, the things that are supposed to be good can be what causes the problem.  I heard of project fail because the wiring was too neat.  Two students completed an electronic project, one did a very neat job by routing and bundling the wires in a cable harness, the other just took the shortest path between points and let all the wires criss-cross in a messy fashion.  The connections were all correct, the parts were all good, perhaps the design was intolerant but the neatly wired project would not work.  I have a deep respect and admiration for the PCB designers that know how to purposely zig-zag traces to equalize trace lengths required to make Ghz computers work.

A personal story of random failures.  About 30 years ago, a system of controllers would intermittently report a communication glitch about twice a week, usually in the wee hours of the morning.  Communications was via 20mA, active transmit (passive receive), 2400 baud.  There were 2 or 3 clusters of controllers spread throughout the building.  We tried swapping boards between controllers, swapping with new boards.
We asked the manufacturer for help, grounded the metal boxes.  Nothing solved it.  Finally, I had the sense to remove the grounds (opposite to what the manufacturer recommended).  Without grounds, the glitch was GONE.  It turned out that what was thought to be one building, was actually 2 buildings connected by an enclosed walk way.  The ground in the other building was contaminated by some other equipment.  We tried a different ground source, same problem.  Never did find out where the ground contamination came from... the customer that was very irritated at our system became very nice when we could prove it was his building ground that was at fault and wouldn't let us pin point the problem.  Perhaps it could have been the cleaners? Those long cords on vacuums could have had a short between neutral and ground?

So next time someone says "make sure it's grounded" you might want to just try the other way and leave no stone unturned!

Cheers,
Josh
 




From: cosmacelf@groups.io <cosmacelf@groups.io> on behalf of Ham Radio <bernard.murphy@...>
Sent: Thursday, September 17, 2020 10:34 PM
To: cosmacelf@groups.io <cosmacelf@groups.io>
Subject: Re: [cosmacelf] Noob question: examine arbitrary memory address? #ELF #Memory
 

Another Noob story (true)...nothing to do with 1802 but here it is anyway.

A whole team of engineers and designers spent weeks trying to figure out why a big telephone switch was crashing randomly.  

They had logic analyzes, digital storage scopes, heat probes, power monitors, etc - all to no avail.

Finally, a manager with grey hair came in the telephone switch room with a small AM transistor radio.  The grey haired manager ran the transistor radio up and down the telephone switch racks for about five minutes.  Finally, he pointed to one card in one rack and said “change that card’.  Sure enough, that card was defective.  The young engineers were dumbfounded !!
--
Regards,
Bernie Murphy


joshbensadon
 

John,  Check the RX pin at the 1802, does it get a pulse?  What character are you sending for Autobaud?  This might matter?  Read the monitor documentation.  I know capital 'U' is one of my favorites because it produces a nice 010101010 pattern for scoping.  Is the 1802 program actually running?  Scope the address lines, you should be able to see the address lines match the baud rate loop.  Keep turning stones!

Cheers, Josh



From: cosmacelf@groups.io <cosmacelf@groups.io> on behalf of John Kennedy <johntkennedy@...>
Sent: Thursday, September 17, 2020 10:38 PM
To: cosmacelf@groups.io <cosmacelf@groups.io>
Subject: Re: [cosmacelf] Noob question: examine arbitrary memory address? #ELF #Memory
 
If the loop back works, proving the physically connections are working, but nothing is ever sent to the TX pin (as measured on the ‘scope), does that imply the monitor software is still in the loop trying to calculate the baud rate?


John Kennedy
 

Yes, the CPU is running says the logic analyzer, and signals seem present. A friend is also building the exact same kit, so when that is complete and we can rule out more of my construction errors. In the meantime I might just try writing some code to try and generate data on the fly - i.e. a loop that does nothing but send out a ‘U’ would be very useful! I love puzzles like this.


joshbensadon
 

That's the spirit!  I do very much the same when trouble shooting.... turn stones, poke it with a stick, etc.  Besides, it's a great programming exercise. 


From: cosmacelf@groups.io <cosmacelf@groups.io> on behalf of John Kennedy <johntkennedy@...>
Sent: Saturday, September 19, 2020 11:52 AM
To: cosmacelf@groups.io <cosmacelf@groups.io>
Subject: Re: [cosmacelf] Noob question: examine arbitrary memory address? #ELF #Memory
 
Yes, the CPU is running says the logic analyzer, and signals seem present. A friend is also building the exact same kit, so when that is complete and we can rule out more of my construction errors. In the meantime I might just try writing some code to try and generate data on the fly - i.e. a loop that does nothing but send out a ‘U’ would be very useful! I love puzzles like this.