Savage///Chats

Software Development => Microcontrollers & Processors => Topic started by: JKnightandKARR on Nov 02, 2025, 01:54 PM

Title: Assembly?
Post by: JKnightandKARR on Nov 02, 2025, 01:54 PM
Just a question. I've got a Z80 book from 1999 when i tried college, would that help me learn assembly? Would it sorta help learn other assembly such as P1/P2? Meaning some of the general concepts/how it works, not commands themselves be of any use??
Title: Re: Assembly?
Post by: granz on Nov 02, 2025, 04:57 PM
I have mentioned this before (possibly not here,) but the best way for a total beginner to learn assembly is CardIAC (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation).) I received one back in the mid-70s in high school, and actually have one still. I credit Bell Labs CardIAC for my understanding of assembly, and deep (electron-chasing level) knowledge of computer operations.

Michael Gardi (re-creater of many old systems) wrote an Instructable on building the CardIAC (https://www.instructables.com/CARDIAC-CARDboard-Illustrative-Aid-to-Computation-/ (https://www.instructables.com/CARDIAC-CARDboard-Illustrative-Aid-to-Computation-/).)

Start by downloading the excellent manual, from the 'Ible, and thoroughly reading all 63 pages (including covers, blank pages and lots of pictures.) After you have read the manual, build the CardIAC re-creation for yourself. Once you have built the "computer," go through the manual again, following all of the examples on your system.

Once you have done that, you could download an emulator (but not before you do the actual work on the cardboard computer - that is essential to the good understanding of assembler) and play around with some of the programs in the CardIAC manual. Next go to Drexel University's outstanding CardIAC page by Professor Stuart (https://www.cs.drexel.edu/~bls96/museum/cardiac.html (https://www.cs.drexel.edu/~bls96/museum/cardiac.html).) Go through Professor Stuart's page for some more advanced topics, like subroutines, recursion and others.

When you have gone through these things, you will have a pretty solid understanding of assembly, machine code and how a computer processes code. From that foundation you can go on to more advanced stuff like the Z-80 (an excellent CPU.)
Title: Re: Assembly?
Post by: Chris Savage on Nov 03, 2025, 10:14 AM
Quote from: JKnightandKARR on Nov 02, 2025, 01:54 PMJust a question. I've got a Z80 book from 1999 when i tried college, would that help me learn assembly?

Is it a college course book, or just a book on Z80 assembly (name / ISBN)?

Quote from: JKnightandKARR on Nov 02, 2025, 01:54 PMWould it sorta help learn other assembly such as P1/P2? Meaning some of the general concepts/how it works, not commands themselves be of any use??

I feel like the difficulty in learning assembly is related to the platform you're on. Like many people from my generation, I learned BASIC on the Apple II and C= VIC-20 first. I then got an assembler for the VIC-20, which has a 6502 CPU. In BASIC, you print a character (or string) to the screen using the "PRINT" command. Using assembly to do the same thing can be daunting to some people, until you understand subroutines. Then you build a subroutine that prints a number of characters by passing the address of the data to the subroutine and call it. The speed is much faster than BASIC.

It can seem like you're writing a lot more code to do simple things, but like I said, if you learn to develop subroutines that you call for I/O and other functions, it really streamlines and simplifies the actual application code. A little planning goes a long way.

BTW, I guess I got a little off-track there. When I mentioned it depending on the platform, think about what I was saying with the VIC-20. You've got a computer with video generation built-in. You don't have to handle the things like generating sync and video, refreshing DRAM, etc. Also, some CPUs have different addressing modes, registers and capabilities for things like math. I found the Z80 to be the best platform to learn on, but that's after programming the 6502 and 6809. Your mileage may vary.

If you need help or have specific questions, feel free to post them. We're here to help.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 03, 2025, 12:01 PM
Quote from: granz on Nov 02, 2025, 04:57 PMI have mentioned this before (possibly not here,) but the best way for a total beginner to learn assembly is CardIAC (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation).) I received one back in the mid-70s in high school, and actually have one still. I credit Bell Labs CardIAC for my understanding of assembly, and deep (electron-chasing level) knowledge of computer operations.

Michael Gardi (re-creater of many old systems) wrote an Instructable on building the CardIAC (https://www.instructables.com/CARDIAC-CARDboard-Illustrative-Aid-to-Computation-/ (https://www.instructables.com/CARDIAC-CARDboard-Illustrative-Aid-to-Computation-/).)

Start by downloading the excellent manual, from the 'Ible, and thoroughly reading all 63 pages (including covers, blank pages and lots of pictures.) After you have read the manual, build the CardIAC re-creation for yourself. Once you have built the "computer," go through the manual again, following all of the examples on your system.

Once you have done that, you could download an emulator (but not before you do the actual work on the cardboard computer - that is essential to the good understanding of assembler) and play around with some of the programs in the CardIAC manual. Next go to Drexel University's outstanding CardIAC page by Professor Stuart (https://www.cs.drexel.edu/~bls96/museum/cardiac.html (https://www.cs.drexel.edu/~bls96/museum/cardiac.html).) Go through Professor Stuart's page for some more advanced topics, like subroutines, recursion and others.

When you have gone through these things, you will have a pretty solid understanding of assembly, machine code and how a computer processes code. From that foundation you can go on to more advanced stuff like the Z-80 (an excellent CPU.)
You mentioned it before. I gotta see if I can access it on my desktop.... right now got issues with it locking up for an unknown reason.  Pretty annoying...  I need to print it out on stiff paper.


Quote from: Chris Savage on Nov 03, 2025, 10:14 AM
Quote from: JKnightandKARR on Nov 02, 2025, 01:54 PMJust a question. I've got a Z80 book from 1999 when i tried college, would that help me learn assembly?

Is it a college course book, or just a book on Z80 assembly (name / ISBN)?

Quote from: JKnightandKARR on Nov 02, 2025, 01:54 PMWould it sorta help learn other assembly such as P1/P2? Meaning some of the general concepts/how it works, not commands themselves be of any use??

I feel like the difficulty in learning assembly is related to the platform you're on. Like many people from my generation, I learned BASIC on the Apple II and C= VIC-20 first. I then got an assembler for the VIC-20, which has a 6502 CPU. In BASIC, you print a character (or string) to the screen using the "PRINT" command. Using assembly to do the same thing can be daunting to some people, until you understand subroutines. Then you build a subroutine that prints a number of characters by passing the address of the data to the subroutine and call it. The speed is much faster than BASIC.

It can seem like you're writing a lot more code to do simple things, but like I said, if you learn to develop subroutines that you call for I/O and other functions, it really streamlines and simplifies the actual application code. A little planning goes a long way.

BTW, I guess I got a little off-track there. When I mentioned it depending on the platform, think about what I was saying with the VIC-20. You've got a computer with video generation built-in. You don't have to handle the things like generating sync and video, refreshing DRAM, etc. Also, some CPUs have different addressing modes, registers and capabilities for things like math. I found the Z80 to be the best platform to learn on, but that's after programming the 6502 and 6809. Your mileage may vary.

If you need help or have specific questions, feel free to post them. We're here to help.
It's a course book. The Z80 Microprocessor: Architecture, Interfacing, Programming, and Design by: Ramesh Gaonkar. ISBN: 0-02-340484-1. 

for me, I learn better by doing, and the only thing I got to learn assembly on is the P1/P2, and not really and material on learning that on there.... and not sure what to use on my old DOS systems or my newer ones to try and learn. Maybe I can find a Z80 emulator online??
Title: Re: Assembly?
Post by: Chris Savage on Nov 03, 2025, 12:35 PM
Quote from: JKnightandKARR on Nov 03, 2025, 12:01 PMIt's a course book. The Z80 Microprocessor: Architecture, Interfacing, Programming, and Design by: Ramesh Gaonkar. ISBN: 0-02-340484-1.

I'm reading it now on Internet Archive (https://archive.org/details/Z80_Microprocessor_1988_Macmillan_Publishing/page/47/mode/2up). Looks like a good book. If you're planning on building a Z80 computer, or other systems based on Von Neumann architecture, you should get the relevant parts and follow the book. That would give you a solid foundation for assembly programming.

There are free assemblers, and low-cost programmers for writing to EPROM, EEPROM or NVRAM. The free assembler runs on Windows 10, though I haven't yet tried it on Windows 11. I assume it would work.

Quote from: JKnightandKARR on Nov 03, 2025, 12:01 PMfor me, I learn better by doing, and the only thing I got to learn assembly on is the P1/P2, and not really and material on learning that on there.... and not sure what to use on my old DOS systems or my newer ones to try and learn.

So, with regards to the P1 / P2; while I would never dissuade anyone from learning assembly on any particular platform, you have to understand that the P1 / P2 are unlike most other platforms. Not just as multi-core MCUs, but the way the assembly is handled on the P1 / P2 is a bit different. My understanding is that the P2 can handle in-line assembly in the code. With the P1, you usually launch a new cog with your assembly code.

There are different pools of memory, shared access to I/O, etc. Just a number of things that would purport to complicate things when you're trying to learn. To a degree, I question the longevity of the P1 / P2. Parallax has become a shadow of what it once was. I'm not sure they have more than a dozen people left anymore, with many people wearing multiple hats. My favorite MCU for assembly used to be the ATmel stuff, though now that Microchip owns them, I haven't done anything with them in a while.

P.S. - Did you get any Z80 hardware to go with this book you have?

Quote from: JKnightandKARR on Nov 03, 2025, 12:01 PMMaybe I can find a Z80 emulator online??
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 03, 2025, 01:36 PM
Quote from: Chris Savage on Nov 03, 2025, 12:35 PM
Quote from: JKnightandKARR on Nov 03, 2025, 12:01 PMIt's a course book. The Z80 Microprocessor: Architecture, Interfacing, Programming, and Design by: Ramesh Gaonkar. ISBN: 0-02-340484-1.

I'm reading it now on Internet Archive (https://archive.org/details/Z80_Microprocessor_1988_Macmillan_Publishing/page/47/mode/2up). Looks like a good book. If you're planning on building a Z80 computer, or other systems based on Von Neumann architecture, you should get the relevant parts and follow the book. That would give you a solid foundation for assembly programming.

There are free assemblers, and low-cost programmers for writing to EPROM, EEPROM or NVRAM. The free assembler runs on Windows 10, though I haven't yet tried it on Windows 11. I assume it would work.

Quote from: JKnightandKARR on Nov 03, 2025, 12:01 PMfor me, I learn better by doing, and the only thing I got to learn assembly on is the P1/P2, and not really and material on learning that on there.... and not sure what to use on my old DOS systems or my newer ones to try and learn.

So, with regards to the P1 / P2; while I would never dissuade anyone from learning assembly on any particular platform, you have to understand that the P1 / P2 are unlike most other platforms. Not just as multi-core MCUs, but the way the assembly is handled on the P1 / P2 is a bit different. My understanding is that the P2 can handle in-line assembly in the code. With the P1, you usually launch a new cog with your assembly code.

There are different pools of memory, shared access to I/O, etc. Just a number of things that would purport to complicate things when you're trying to learn. To a degree, I question the longevity of the P1 / P2. Parallax has become a shadow of what it once was. I'm not sure they have more than a dozen people left anymore, with many people wearing multiple hats. My favorite MCU for assembly used to be the ATmel stuff, though now that Microchip owns them, I haven't done anything with them in a while.

P.S. - Did you get any Z80 hardware to go with this book you have?

Quote from: JKnightandKARR on Nov 03, 2025, 12:01 PMMaybe I can find a Z80 emulator online??
No, I never have gotten or had any Z80 hardware, but I did find some Z80 emulators online. Between the book and that cardiac, should help.

EDIT: http://www.z80.info/z80emu.htm#EMU_CPU_W32 (http://www.z80.info/z80emu.htm#EMU_CPU_W32)
Title: Re: Assembly?
Post by: Chris Savage on Nov 03, 2025, 02:05 PM
Quote from: JKnightandKARR on Nov 03, 2025, 01:36 PMNo, I never have gotten or had any Z80 hardware, but I did find some Z80 emulators online. Between the book and that cardiac, should help.
http://www.z80.info/z80emu.htm#EMU_CPU_W32 (http://www.z80.info/z80emu.htm#EMU_CPU_W32)

Thomas Scherrer's Z80.info website has been around for a very long time. I still go there for reference stuff once in a while. Pretty sure I downloaded a Z80 disassembler from there. If you decide to go the Z80 route, I think you'll find a lot of help here from multiple Z80 users.  ;)
Title: Re: Assembly?
Post by: granz on Nov 04, 2025, 07:09 AM
Quote from: Chris Savage on Nov 03, 2025, 10:14 AMI feel like the difficulty in learning assembly is related to the platform you're on.
I agree with what Chris said here; the simpler the platform the simpler the assembly language. That is why I recommended the Cardiac - that is almost the simplest computer that you can possibly get, and thus the simplest assembly language that you can get.

Quote from: JKnightandKARR on Nov 03, 2025, 01:36 PM
Quote from: Chris Savage on Nov 03, 2025, 12:35 PMP.S. - Did you get any Z80 hardware to go with this book you have?
No, I never have gotten or had any Z80 hardware, but I did find some Z80 emulators online. Between the book and that cardiac, should help.
The Sinclair ZX-80/ZX-81 (Timex Sinclair TS1000) computers were Z-80-based, and can usually be found pretty cheap. If you would like, I can send mine to you. I don't know which ones work, you would need to figure out which one(s) do work. But then you could start playing with actual Z-80 assembly.

Quote from: Chris Savage on Nov 03, 2025, 02:05 PMIf you decide to go the Z80 route, I think you'll find a lot of help here from multiple Z80 users.  ;)
Yep, I am one of them.
Title: Re: Assembly?
Post by: Chris Savage on Nov 04, 2025, 09:55 AM
Quote from: granz on Nov 04, 2025, 07:09 AM
Quote from: Chris Savage on Nov 03, 2025, 02:05 PMIf you decide to go the Z80 route, I think you'll find a lot of help here from multiple Z80 users.  ;)
Yep, I am one of them.

I know there are at least three of us on these forums that I would consider proficient with the Z80.  8)
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 04, 2025, 11:14 AM
Quote from: granz on Nov 04, 2025, 07:09 AM
Quote from: Chris Savage on Nov 03, 2025, 10:14 AMI feel like the difficulty in learning assembly is related to the platform you're on.
I agree with what Chris said here; the simpler the platform the simpler the assembly language. That is why I recommended the Cardiac - that is almost the simplest computer that you can possibly get, and thus the simplest assembly language that you can get.

Quote from: JKnightandKARR on Nov 03, 2025, 01:36 PM
Quote from: Chris Savage on Nov 03, 2025, 12:35 PMP.S. - Did you get any Z80 hardware to go with this book you have?
No, I never have gotten or had any Z80 hardware, but I did find some Z80 emulators online. Between the book and that cardiac, should help.
The Sinclair ZX-80/ZX-81 (Timex Sinclair TS1000) computers were Z-80-based, and can usually be found pretty cheap. If you would like, I can send mine to you. I don't know which ones work, you would need to figure out which one(s) do work. But then you could start playing with actual Z-80 assembly.

Quote from: Chris Savage on Nov 03, 2025, 02:05 PMIf you decide to go the Z80 route, I think you'll find a lot of help here from multiple Z80 users.  ;)
Yep, I am one of them.
Sure, that could help. Ihave access to my desktop, notsure whats making it lock, but i'll print the cardiac stuff out, just need ti get some stiff paper.  I tried the P1 assembly docs i have, but totally lost on the subject...

Quote from: Chris Savage on Nov 04, 2025, 09:55 AM
Quote from: granz on Nov 04, 2025, 07:09 AM
Quote from: Chris Savage on Nov 03, 2025, 02:05 PMIf you decide to go the Z80 route, I think you'll find a lot of help here from multiple Z80 users.  ;)
Yep, I am one of them.

I know there are at least three of us on these forums that I would consider proficient with the Z80.  8)
Good to know atleast you 2 are. Thanks for the help.
Title: Re: Assembly?
Post by: Chris Savage on Nov 04, 2025, 11:39 AM
Quote from: JKnightandKARR on Nov 04, 2025, 11:14 AMGood to know atleast you 2 are. Thanks for the help.

There's also MicroNut (https://savagechats.com/index.php?action=profile;u=16), who was also at the Meetup. He's currently working on a Z80 book (https://savagechats.com/index.php?topic=372.0). As I've said before, the Z80 has always been my favorite platform to develop on. It's fun, easy and powerful, while maintaining simplicity and backward compatibility (machine code) with two other previously popular platforms, including the 8080.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 04, 2025, 03:23 PM
Quote from: Chris Savage on Nov 04, 2025, 11:39 AM
Quote from: JKnightandKARR on Nov 04, 2025, 11:14 AMGood to know atleast you 2 are. Thanks for the help.

There's also MicroNut (https://savagechats.com/index.php?action=profile;u=16), who was also at the Meetup. He's currently working on a Z80 book (https://savagechats.com/index.php?topic=372.0). As I've said before, the Z80 has always been my favorite platform to develop on. It's fun, easy and powerful, while maintaining simplicity and backward compatibility (machine code) with two other previously popular platforms, including the 8080.
Cool.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 05, 2025, 01:33 PM
Quote from: granz on Nov 04, 2025, 07:09 AMThe Sinclair ZX-80/ZX-81 (Timex Sinclair TS1000) computers were Z-80-based, and can usually be found pretty cheap. If you would like, I can send mine to you. I don't know which ones work, you would need to figure out which one(s) do work. But then you could start playing with actual Z-80 assembly.
I found schematics last night along with the 16Kb RAM.
Title: Re: Assembly?
Post by: granz on Nov 05, 2025, 03:29 PM
Quote from: JKnightandKARR on Nov 05, 2025, 01:33 PM
Quote from: granz on Nov 04, 2025, 07:09 AMThe Sinclair ZX-80/ZX-81 (Timex Sinclair TS1000) computers were Z-80-based, and can usually be found pretty cheap. If you would like, I can send mine to you. I don't know which ones work, you would need to figure out which one(s) do work. But then you could start playing with actual Z-80 assembly.
I found schematics last night along with the 16Kb RAM.
So, do you have just the 16K RAM, or do you have more?
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 05, 2025, 04:08 PM
Quote from: granz on Nov 05, 2025, 03:29 PM
Quote from: JKnightandKARR on Nov 05, 2025, 01:33 PM
Quote from: granz on Nov 04, 2025, 07:09 AMThe Sinclair ZX-80/ZX-81 (Timex Sinclair TS1000) computers were Z-80-based, and can usually be found pretty cheap. If you would like, I can send mine to you. I don't know which ones work, you would need to figure out which one(s) do work. But then you could start playing with actual Z-80 assembly.
I found schematics last night along with the 16Kb RAM.
So, do you have just the 16K RAM, or do you have more?
as far as i know there is only a 16kb ram exp module, i wondered if more could be added??
https://www.retroisle.com/sinclair/zx81/Technical/Hardware/16KRamPackSchematics.php (https://www.retroisle.com/sinclair/zx81/Technical/Hardware/16KRamPackSchematics.php)
Title: Re: Assembly?
Post by: Chris Savage on Nov 05, 2025, 05:08 PM
Are you looking for the Main Board Schematics (https://www.retroisle.com/sinclair/zx81/Technical/Hardware/ZX81-Schematics.php)?
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 05, 2025, 05:45 PM
Quote from: Chris Savage on Nov 05, 2025, 05:08 PMAre you looking for the Main Board Schematics (https://www.retroisle.com/sinclair/zx81/Technical/Hardware/ZX81-Schematics.php)?
No. I found them already, thought I'd look stuff up if Granz sends me any of em.
Title: Re: Assembly?
Post by: Chris Savage on Nov 05, 2025, 05:54 PM
Quote from: JKnightandKARR on Nov 05, 2025, 05:45 PMNo. I found them already, thought I'd look stuff up if Granz sends me any of em.

Gotcha. Well, for getting started you can just focus on the main board. You don't need a lot of RAM when writing assembly code. It's very small. Once you are familiar with the code, you can start building applications. Then you might need more RAM.  ;)
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 07, 2025, 12:55 PM
Quote from: granz on Nov 04, 2025, 07:09 AMThe Sinclair ZX-80/ZX-81 (Timex Sinclair TS1000) computers were Z-80-based, and can usually be found pretty cheap. If you would like, I can send mine to you. I don't know which ones work, you would need to figure out which one(s) do work. But then you could start playing with actual Z-80 assembly.
I'm on Ch 4 or 5 of that Cardiac manual. Still little confused on the printing out parts.  Esp the lady bugs.....
Title: Re: Assembly?
Post by: Chris Savage on Nov 07, 2025, 01:20 PM
Quote from: JKnightandKARR on Nov 07, 2025, 12:55 PMI'm on Ch 4 or 5 of that Cardiac manual. Still little confused on the printing out parts.  Esp the lady bugs.....

All I know about Cardiac, is I hope I never have one!  :o
Title: Re: Assembly?
Post by: granz on Nov 07, 2025, 10:15 PM
Quote from: JKnightandKARR on Nov 07, 2025, 12:55 PMI'm on Ch 4 or 5 of that Cardiac manual. Still little confused on the printing out parts.  Esp the lady bugs.....
The lady bug is nothing more than a pointer to the currently accessed memory location. Think of it as a visual representation of which memory location is being addressed. It will become more apparent when you build your own, and run a simple program.
Title: Re: Assembly?
Post by: Chris Savage on Nov 07, 2025, 10:31 PM
Quote from: granz on Nov 07, 2025, 10:15 PMThe lady bug is nothing more than a pointer to the currently accessed memory location. Think of it as a visual representation of which memory location is being addressed. It will become more apparent when you build your own, and run a simple program.

This sounds suspiciously like the PC (program counter).  :-\
Title: Re: Assembly?
Post by: granz on Nov 08, 2025, 06:49 AM
Quote from: Chris Savage on Nov 07, 2025, 10:31 PM
Quote from: granz on Nov 07, 2025, 10:15 PMThe lady bug is nothing more than a pointer to the currently accessed memory location. Think of it as a visual representation of which memory location is being addressed. It will become more apparent when you build your own, and run a simple program.

This sounds suspiciously like the PC (program counter).  :-\
Yes, Chris is correct. Page 17 of the manual (page 26 of the PDF file) describes the PC register. It just keeps track of which memory location will provide the next instruction. In the event of an instruction that alters the program progress (I.E. a jump, or a looping, instruction) the PC register (the Lady Bug) will be moved in the processing of the current instruction, so that it then indicates the new next instruction.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 09, 2025, 11:44 AM
Quote from: granz on Nov 08, 2025, 06:49 AM
Quote from: Chris Savage on Nov 07, 2025, 10:31 PM
Quote from: granz on Nov 07, 2025, 10:15 PMThe lady bug is nothing more than a pointer to the currently accessed memory location. Think of it as a visual representation of which memory location is being addressed. It will become more apparent when you build your own, and run a simple program.

This sounds suspiciously like the PC (program counter).  :-\
Yes, Chris is correct. Page 17 of the manual (page 26 of the PDF file) describes the PC register. It just keeps track of which memory location will provide the next instruction. In the event of an instruction that alters the program progress (I.E. a jump, or a looping, instruction) the PC register (the Lady Bug) will be moved in the processing of the current instruction, so that it then indicates the new next instruction.
So your saying no matter what my code will always have bugs in it?? Rotflmao
Title: Re: Assembly?
Post by: Chris Savage on Nov 09, 2025, 04:36 PM
Quote from: JKnightandKARR on Nov 09, 2025, 11:44 AMSo your saying no matter what my code will always have bugs in it?? Rotflmao

(https://upload.wikimedia.org/wikipedia/commons/3/3b/Paris_Tuileries_Garden_Facepalm_statue.jpg)
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 09, 2025, 05:02 PM
Title: Re: Assembly?
Post by: granz on Nov 09, 2025, 05:51 PM
Quote from: JKnightandKARR on Nov 09, 2025, 11:44 AMSo your saying no matter what my code will always have bugs in it?? Rotflmao
HA! Yeah. ;D

At first I was thinking about the difficulty of writing error-free code, but then I got it (Lady Bug.)

That was good.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 09, 2025, 06:24 PM
Quote from: granz on Nov 09, 2025, 05:51 PM
Quote from: JKnightandKARR on Nov 09, 2025, 11:44 AMSo your saying no matter what my code will always have bugs in it?? Rotflmao
HA! Yeah. ;D

At first I was thinking about the difficulty of writing error-free code, but then I got it (Lady Bug.)

That was good.
ROTFLMAO i ALMOST got you on that joke. Lol oh well.... 1 of 2 ain't bad.
Title: Re: Assembly?
Post by: Chris Savage on Nov 09, 2025, 11:12 PM
I got the joke.  ;)  But, I wonder if you do understand the program counter? That's a very important register.  8)
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 10, 2025, 06:55 AM
Quote from: Chris Savage on Nov 09, 2025, 11:12 PMI got the joke.  ;)  But, I wonder if you do understand the program counter? That's a very important register.  8)
I am just getting to that part in the cardiac book actually. Was reading it yesterday at work and stoped in that area.
Title: Re: Assembly?
Post by: Chris Savage on Nov 10, 2025, 09:08 AM
Quote from: JKnightandKARR on Nov 10, 2025, 06:55 AMI am just getting to that part in the cardiac book actually. Was reading it yesterday at work and stoped in that area.

I should have said that ALL the registers are important to understand. Many assembly instructions have multiple address modes as well. I tend to think of the program counter from the context of the Z80:

QuoteThe Z80 program counter (PC) is a 16-bit register that holds the memory address of the next instruction to be fetched and executed by the CPU. After fetching an instruction, the PC is automatically incremented, and for jump or call instructions, it is directly loaded with the new address, overriding the increment. The Z80 does not allow direct modification of the PC with a standard instruction; instead, a new address can be pushed onto the stack and then the stack's top value can be retrieved using a RET instruction, which loads it into the PC.

Of course, you could just do a JP to an address to force load it as well. But I think it demonstrates the power of the PC.
Title: Re: Assembly?
Post by: MicroNut on Nov 10, 2025, 12:41 PM
Once again I'm a little late to the party. My assembly code experience was learning 6502 assembly in college. Penn State at the time thought it would be THE computer chip of the future. :) I also had a course in microcoding, which is learning the algorithms involved in taking the adders and shifters of a cpu and make them do higher level math.  I then got a ZX81 and to bypass all the limitations of Basic I delved into Z80. I also used Z80 at one of my jobs.

The book I was working on was my attempt of learning how the internal logic of the Z80 works. It stalled out when I got to the PLA (Programming Logic Array) which was a lot more complex than I bargained for. Right now I'm chasing another squirrel, learning the Propeller 2 and I would also like to get into the assembly code. So, we could share notes :)

Chris is right that the P1 and P2 aren't the same as Z80 and 6502. One thing it does is self modifying code which is a great way of conditional redirecting but gives me nightmares! Also to use assembly wisely one must know the hardware they are using. So I'm learning more about streaming and smart pins to work with the P2.

If you plan on looking into the Z80 assembler on a ZX81 an emulator that works well can be found at
https://sourceforge.net/projects/eightyone-sinclair-emulator/ (https://sourceforge.net/projects/eightyone-sinclair-emulator/)
and the best forum for advice is www.sinclairzxworld.com (http://www.sinclairzxworld.com/)
Title: Re: Assembly?
Post by: Chris Savage on Nov 10, 2025, 02:28 PM
Quote from: MicroNut on Nov 10, 2025, 12:41 PMOnce again I'm a little late to the party. My assembly code experience was learning 6502 assembly in college.

I wouldn't say you're late to the party. This party is just getting started!  8)

Quote from: MicroNut on Nov 10, 2025, 12:41 PMRight now I'm chasing another squirrel, learning the Propeller 2 and I would also like to get into the assembly code. So, we could share notes :) Chris is right that the P1 and P2 aren't the same as Z80 and 6502.

Yeah, there's the whole CPU VS MCU VS SBC thing, but then, just among MCUs, the P1 / P2 are multi-core, adding a level of complexity that makes it more interesting for those trying to learn on that platform. then of course there's the lack of educational resources for the P2 and well, I would definitely start with something simpler.

For those reading this and wondering what all the acronyms are:

CPU - Central Processing Unit - The brains of a computer system. RAM, ROM, I/O and interface circuitry are in addition to the CPU in a computer system. See my Z80 Control Board (https://savagecircuits.com/z80-control-board/) for an example.

MCU - Micro-Controller Unit - A complete system that includes the CPU, RAM, ROM, I/O, etc. Usually requires an external clock and voltage regulation, but otherwise quite complete for digital control systems. An Arduino (https://savagecircuits.com/arduino-oem-arduino/) is a good example of an MCU.

SBC - Sing-Board Computer - A Raspberry Pi (https://savagecircuits.com/raspberry-pi-to-serial-lcd/) is a good example of an SBC. These systems run an entire O/S and, while they may be able to control much the same digital systems as an MCU, there is a lot of overhead, especially from a software standpoint.

Another little note for future readers...the 6502 and Z80 are both 8-bit CPUs (as indicated by their 8-bit data bus), however, the Z80 can directly access 16-bit registers by using two registers. This gives it direct 16-bit data manipulation. The Z80 also includes two 16-bit index registers.

...we now return to our original educational thread, already in progress...
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 11, 2025, 12:39 AM
Quote from: Chris Savage on Nov 10, 2025, 09:08 AMI should have said that ALL the registers are important to understand. Many assembly instructions have multiple address modes as well. I tend to think of the program counter from the context of the Z80:
That goes without saying. I may not know much, but I do know they are all there for a good reason.9k and a specific job.

Quote from: Chris Savage on Nov 10, 2025, 09:08 AMThe Z80 program counter (PC) is a 16-bit register that holds the memory address of the next instruction to be fetched and executed by the CPU. After fetching an instruction, the PC is automatically incremented, and for jump or call instructions, it is directly loaded with the new address, overriding the increment. The Z80 does not allow direct modification of the PC with a standard instruction; instead, a new address can be pushed onto the stack and then the stack's top value can be retrieved using a RET instruction, which loads it into the PC.

Of course, you could just do a JP to an address to force load it as well. But I think it demonstrates the power of the PC.[/quote]
I think I understand, but it's still a little blurry at the moment... Could be that I am pretty tired right now too...

Quote from: MicroNut on Nov 10, 2025, 12:41 PMOnce again I'm a little late to the party. My assembly code experience was learning 6502 assembly in college. Penn State at the time thought it would be THE computer chip of the future. :) I also had a course in microcoding, which is learning the algorithms involved in taking the adders and shifters of a cpu and make them do higher level math.  I then got a ZX81 and to bypass all the limitations of Basic I delved into Z80. I also used Z80 at one of my jobs.

The book I was working on was my attempt of learning how the internal logic of the Z80 works. It stalled out when I got to the PLA (Programming Logic Array) which was a lot more complex than I bargained for. Right now I'm chasing another squirrel, learning the Propeller 2 and I would also like to get into the assembly code. So, we could share notes :)

Chris is right that the P1 and P2 aren't the same as Z80 and 6502. One thing it does is self modifying code which is a great way of conditional redirecting but gives me nightmares! Also to use assembly wisely one must know the hardware they are using. So I'm learning more about streaming and smart pins to work with the P2.

If you plan on looking into the Z80 assembler on a ZX81 an emulator that works well can be found at
https://sourceforge.net/projects/eightyone-sinclair-emulator/ (https://sourceforge.net/projects/eightyone-sinclair-emulator/)
and the best forum for advice is www.sinclairzxworld.com (http://www.sinclairzxworld.com/)
Oh trust me, I didn't expect the P1/P2 to be the same, just somewhat similar.  Learning the P1/P2 assem is a goal, though at moment, I am trying to figure out how to understand the P2 Spin....  I also wanna learn other stuff, such as Arduino, stuff for Raspberry Pi's, and the PicoMite.  Wonder for quite a while if putting too much on the fire at the same time??

I used to understand assembly on Z80 very well... but many years of not using any of it, I've forgotten it ALL.... I really need to get my desk done, so I can get back into it all...  I've even forgotten some of the BS2/P1 files I've made... well, somewhat, little studying and I got it for the most part.

Title: Re: Assembly?
Post by: Chris Savage on Nov 11, 2025, 09:03 AM
Wait until you learn about the Stack Pointer (SP), and the difference between the SP on the 6502 (which grows up in memory) VS the SP on the Z80 (which grows down in memory). Okay, now I'm just throwing fuel on the fire.  :-X

Sorry about that!  ::)  I just get so excited talking about CPUs based on Von Neumann architecture!  :-[
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 11, 2025, 10:41 AM
Quote from: Chris Savage on Nov 11, 2025, 09:03 AMWait until you learn about the Stack Pointer (SP), and the difference between the SP on the 6502 (which grows up in memory) VS the SP on the Z80 (which grows down in memory). Okay, now I'm just throwing fuel on the fire.  :-X

Sorry about that!  ::)  I just get so excited talking about CPUs based on Von Neumann architecture!  :-[
Lol, you're ok.  I just got waaaaaay tired, think blood sugar was high and/or just very tired. Either way, I need to reread stuff and retype my reply.

Edit: If I understand the PC correctly, It stores the memory location of the instructions to be executed, kinda like some lines of code are on screens when working on programs, NOT the ones from the full list of all avail. instructions from the CPU/MCU. EX:
10
20
30
etc,,,
Yes?
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 11, 2025, 11:43 AM
I've edited the above post from last night, after being able to understand what was being said.
Title: Re: Assembly?
Post by: Chris Savage on Nov 11, 2025, 02:28 PM
Quote from: JKnightandKARR on Nov 11, 2025, 10:41 AMEdit: If I understand the PC correctly, It stores the memory location of the instructions to be executed, kinda like some lines of code are on screens when working on programs, NOT the ones from the full list of all avail. instructions from the CPU/MCU. EX:
10
20
30
etc,,,
Yes?

Line numbers like that are used in high-level languages like BASIC. This is because each BASIC instruction actually takes up many low-level machine instructions within the BASIC interpreter.

In assembly language, labels are used in place of actual memory locations that the PC holds. For example, $0300. So if my Z80 program starts at location $0100, I might have something like this:

    .ORG $0300
INITIO    LD A,$00
    OUT (LATCH),A
    LD A,(IODATA)
    OUT (CONTROL),A
    LD A,$00
    OUT (PORTB),A
    OUT (PORTC),A
    RET
IODATA    .BYTE $90            ;INIT DATA
    LD HL,LCDDATA
IOLOOP    CALL CHKBUSY
    LD A,(HL)
    OR A
    RET Z
    OUT (LCDI),A
    INC HL
    JP IOLOOP
LCDDATA    .BYTE $38,$08,$01,$06,$0C,$00    ;INIT DATA
    CALL CHKBUSY
    LD HL,CGDATA
    LD B,$10            ;BYTE COUNT
    LD C,$40            ;CG RAM ADDRESS
    LD A,C
    OUT (LCDI),A
    CALL CHKBUSY
    LD A,(HL)
    OUT (LCDD),A
    INC HL
    DEC B
    RET Z
    INC C
    LD A,C
    OUT (LCDI),A
    JP $0333
    .BYTE $11,$00,$04,$00,$11,$0E,$00,$00    ;CHARACTER 1 DATA
    .BYTE $11,$00,$04,$00,$0E,$11,$00,$00    ;CHARACTER 2 DATA
KNIGHT    LD HL,KDATA
    CALL PRINT
    RET
KDATA    .BYTE $0C,"PROGRAMMING COPYRIGHT 1994 CHRIS SAVAGE",$07,$00
RAMTEST    CALL LFEED
    LD HL,RAMDAT1
    CALL PRINT
    LD HL,RAMBOT
    LD BC,$0001
RAMLOOP    LD D,(HL)
    LD E,$AA            ;BIT PATTERN 1
    LD (HL),E
    LD A,(HL)
    CP E
    JP NZ,RAMFAIL
    LD E,$55            ;BIT PATTERN 2
    LD (HL),E
    LD A,(HL)
    CP E
    JP NZ,RAMFAIL
    LD (HL),D            ;RESTORE OLD DATA
    ADD HL,BC
    JP C,RAMPASS
    JP RAMLOOP
RAMPASS    SCF
    CCF
    LD BC,$8000
    SBC HL,BC
    LD ($A100),HL
    CALL DECIMAL
    LD HL,RAMDAT2
    CALL PRINT
    LD D,$08
    CALL DELAY3
    RET
RAMFAIL    CALL LFEED
    LD ($8100),HL
    LD HL,RAMDAT3
    CALL PRINT
    LD HL,($8100)
    LD ($A100),HL
    CALL DECIMAL
    LD HL,RAMDAT4
    CALL PRINT
    LD HL,($8100)
    LD ($A100),HL
    CALL HEX
    LD HL,RAMDAT5
    CALL PRINT
    DI
    JP $03F0            ;LOOP FOREVER (HALT)
RAMDAT1    .BYTE "TESTING RAM...",$00
RAMDAT2    .BYTE $20,"BYTES PASSED.",$00
RAMDAT3    .BYTE "RAM FAILURE AT LOCATION ",$00
RAMDAT4    .BYTE "  ($",$00
RAMDAT5    .BYTE ")",$00,$00
INITVAR    LD A,$00
    LD ($8000),A
    LD ($8001),A
    LD ($8002),A
    LD ($8008),A
    LD ($8009),A
    LD A,$FF
    LD ($8002),A
    LD HL,$0200
    LD ($8003),HL
    LD A,$06
    LD ($8005),A
    LD ($8006),A
    RET

Most older compilers make two passes when compiling...the first usually calculates the addresses for the labels, and the second converts the mnemonics into machine code.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 11, 2025, 02:39 PM
Quote from: Chris Savage on Nov 11, 2025, 02:28 PM
Quote from: JKnightandKARR on Nov 11, 2025, 10:41 AMEdit: If I understand the PC correctly, It stores the memory location of the instructions to be executed, kinda like some lines of code are on screens when working on programs, NOT the ones from the full list of all avail. instructions from the CPU/MCU. EX:
10
20
30
etc,,,
Yes?

Line numbers like that are used in high-level languages like BASIC. This is because each BASIC instruction actually takes up many low-level machine instructions within the BASIC interpreter.

In assembly language, labels are used in place of actual memory locations that the PC holds. For example, $0300. So if my Z80 program starts at location $0100, I might have something like this:

    .ORG $0300
INITIO    LD A,$00
    OUT (LATCH),A
    LD A,(IODATA)
    OUT (CONTROL),A
    LD A,$00
    OUT (PORTB),A
    OUT (PORTC),A
    RET
IODATA    .BYTE $90            ;INIT DATA
    LD HL,LCDDATA
IOLOOP    CALL CHKBUSY
    LD A,(HL)
    OR A
    RET Z
    OUT (LCDI),A
    INC HL
    JP IOLOOP
LCDDATA    .BYTE $38,$08,$01,$06,$0C,$00    ;INIT DATA
    CALL CHKBUSY
    LD HL,CGDATA
    LD B,$10            ;BYTE COUNT
    LD C,$40            ;CG RAM ADDRESS
    LD A,C
    OUT (LCDI),A
    CALL CHKBUSY
    LD A,(HL)
    OUT (LCDD),A
    INC HL
    DEC B
    RET Z
    INC C
    LD A,C
    OUT (LCDI),A
    JP $0333
    .BYTE $11,$00,$04,$00,$11,$0E,$00,$00    ;CHARACTER 1 DATA
    .BYTE $11,$00,$04,$00,$0E,$11,$00,$00    ;CHARACTER 2 DATA
KNIGHT    LD HL,KDATA
    CALL PRINT
    RET
KDATA    .BYTE $0C,"PROGRAMMING COPYRIGHT 1994 CHRIS SAVAGE",$07,$00
RAMTEST    CALL LFEED
    LD HL,RAMDAT1
    CALL PRINT
    LD HL,RAMBOT
    LD BC,$0001
RAMLOOP    LD D,(HL)
    LD E,$AA            ;BIT PATTERN 1
    LD (HL),E
    LD A,(HL)
    CP E
    JP NZ,RAMFAIL
    LD E,$55            ;BIT PATTERN 2
    LD (HL),E
    LD A,(HL)
    CP E
    JP NZ,RAMFAIL
    LD (HL),D            ;RESTORE OLD DATA
    ADD HL,BC
    JP C,RAMPASS
    JP RAMLOOP
RAMPASS    SCF
    CCF
    LD BC,$8000
    SBC HL,BC
    LD ($A100),HL
    CALL DECIMAL
    LD HL,RAMDAT2
    CALL PRINT
    LD D,$08
    CALL DELAY3
    RET
RAMFAIL    CALL LFEED
    LD ($8100),HL
    LD HL,RAMDAT3
    CALL PRINT
    LD HL,($8100)
    LD ($A100),HL
    CALL DECIMAL
    LD HL,RAMDAT4
    CALL PRINT
    LD HL,($8100)
    LD ($A100),HL
    CALL HEX
    LD HL,RAMDAT5
    CALL PRINT
    DI
    JP $03F0            ;LOOP FOREVER (HALT)
RAMDAT1    .BYTE "TESTING RAM...",$00
RAMDAT2    .BYTE $20,"BYTES PASSED.",$00
RAMDAT3    .BYTE "RAM FAILURE AT LOCATION ",$00
RAMDAT4    .BYTE "  ($",$00
RAMDAT5    .BYTE ")",$00,$00
INITVAR    LD A,$00
    LD ($8000),A
    LD ($8001),A
    LD ($8002),A
    LD ($8008),A
    LD ($8009),A
    LD A,$FF
    LD ($8002),A
    LD HL,$0200
    LD ($8003),HL
    LD A,$06
    LD ($8005),A
    LD ($8006),A
    RET

Most older compilers make two passes when compiling...the first usually calculates the addresses for the labels, and the second converts the mnemonics into machine code.
I figured, but in yours starts $0300, so thinkning something like:
$0300 LD A $00
$0301 OUT (LATCH),A
$0302 LD A,(IODATA)
$0303 OUT (CONTROL),A
$etc..
 yes?
Title: Re: Assembly?
Post by: Chris Savage on Nov 11, 2025, 02:48 PM
Quote from: JKnightandKARR on Nov 11, 2025, 02:39 PMI figured, but in yours starts $0300, so thinkning something like:
$0300 LD A $00
$0301 OUT (LATCH),A
$0302 LD A,(IODATA)
$0303 OUT (CONTROL),A
$etc..
 yes?

Unfortunately, no, because LD A, $00 takes up more than one byte of machine code.

When I have a moment, I will compile and save the LST file, which should have the addresses.
Title: Re: Assembly?
Post by: Chris Savage on Nov 11, 2025, 09:31 PM
The first column is the actual address in memory. The next few bytes are the machine code, followed by the ASM mnemonics. The first line is simply a directive telling the assembler where in memory this code should reside.

This should give you an idea of how stuff ends up in memory after assembly. The $20 are spaces as you can see in the byte blocks.

0000                          .ORG    0
0000 F3                      DI                    ; Disable interrupt
0001 31 FF FF                LD    SP,RAMTOP      ; Set stack pointer to top off ram
0004 ED 56                    IM    1              ; Set interrupt mode 1
0006 C3 00 01                JP    $100          ; jump to Start of program
0009           
0009 20 74 65 73              .byte " test system "  ; text string in rom
000D 74 20 73 79
0011 73 74 65 6D
0015 20
0016 20 56 20 31              .byte " V 1.00 "
001A 2E 30 30 20
001E 20 31 39 39              .byte " 1997 "
0022 37 20

P.S. - It may help to know that the constant, "RAMTOP" was set to $FFFF in a previous portion of this source code.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 11, 2025, 10:41 PM
Quote from: Chris Savage on Nov 11, 2025, 02:48 PM
Quote from: JKnightandKARR on Nov 11, 2025, 02:39 PMI figured, but in yours starts $0300, so thinkning something like:
$0300 LD A $00
$0301 OUT (LATCH),A
$0302 LD A,(IODATA)
$0303 OUT (CONTROL),A
$etc..
 yes?

Unfortunately, no, because LD A, $00 takes up more than one byte of machine code.

When I have a moment, I will compile and save the LST file, which should have the addresses.
Got it, but generally speaking, they go in that order? from the first instruction being at/near $0300 down line by line to whatever the final address is, such as maybe $1254 for example, being the last one.
Title: Re: Assembly?
Post by: granz on Nov 12, 2025, 07:42 AM
Quote from: JKnightandKARR on Nov 11, 2025, 10:41 AMIf I understand the PC correctly, It stores the memory location of the instructions to be executed, kinda like some lines of code are on screens when working on programs, NOT the ones from the full list of all avail. instructions from the CPU/MCU. EX:
10
20
30
etc,,,
Yes?

You are actually putting way more complexity into this than it really is. The PC register is actually only a single memory location holding a single number (that is what a register really is.) That number, held in the PC register, is the address of the next single instruction in the program - not a list of future instructions.

The process of doing an instruction consists of two phases: the "fetch" phase, and the "operate" phase. In the fetch phase (page 14 - PDF file page 23) the processor will look at the PC register, and then take the number from that and put it onto the address bus, which will choose a single location in memory. The CardIAC model actually cheats a tiny bit, and shows the location in memory, rather than the address - so in running CardIAC, you skip the process of reading the PC register and placing that number onto the address bus; the PC register appears to actually address memory. The memory will put the single number that is in that location onto the data bus. The processor will take that (again) single number and put it into the instruction register. This is represented by the first box (right above the start) labelled "Instruction Register". The directions say to move the slides to "Move slides to agree with the contents of the bugs cell." This is the CardIAC equivalent of what I descried above.

Once the processor has placed the instruction number from memory in to the Instruction Register, the processor increments the PC register ("move the bug to the next location in memory") this keeps track of the location of the next instruction in your program. The processor then takes the steps (called microcode) from that number and performs those steps. You will see this when you build your own CardIAC - as you move the slide for the first digit of the number in memory it will change the commands in the "Instruction Decoder" at the top of the flow chart.

This is really the first rung on the ladder to becoming proficient in assembly language (and thus all other) programming. Ignore all the stuff about other registers (the second rung on that ladder) and addressing modes (the third rung) and everything else for now. Once you get to the first rung (that is all that CardIAC tries to get for you,) then you will be able to apply what you learn, and extend it to higher levels of assembly.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 13, 2025, 10:43 AM
Quote from: granz on Nov 12, 2025, 07:42 AM
Quote from: JKnightandKARR on Nov 11, 2025, 10:41 AMIf I understand the PC correctly, It stores the memory location of the instructions to be executed, kinda like some lines of code are on screens when working on programs, NOT the ones from the full list of all avail. instructions from the CPU/MCU. EX:
10
20
30
etc,,,
Yes?

You are actually putting way more complexity into this than it really is. The PC register is actually only a single memory location holding a single number (that is what a register really is.) That number, held in the PC register, is the address of the next single instruction in the program - not a list of future instructions.

The process of doing an instruction consists of two phases: the "fetch" phase, and the "operate" phase. In the fetch phase (page 14 - PDF file page 23) the processor will look at the PC register, and then take the number from that and put it onto the address bus, which will choose a single location in memory. The CardIAC model actually cheats a tiny bit, and shows the location in memory, rather than the address - so in running CardIAC, you skip the process of reading the PC register and placing that number onto the address bus; the PC register appears to actually address memory. The memory will put the single number that is in that location onto the data bus. The processor will take that (again) single number and put it into the instruction register. This is represented by the first box (right above the start) labelled "Instruction Register". The directions say to move the slides to "Move slides to agree with the contents of the bugs cell." This is the CardIAC equivalent of what I descried above.

Once the processor has placed the instruction number from memory in to the Instruction Register, the processor increments the PC register ("move the bug to the next location in memory") this keeps track of the location of the next instruction in your program. The processor then takes the steps (called microcode) from that number and performs those steps. You will see this when you build your own CardIAC - as you move the slide for the first digit of the number in memory it will change the commands in the "Instruction Decoder" at the top of the flow chart.

This is really the first rung on the ladder to becoming proficient in assembly language (and thus all other) programming. Ignore all the stuff about other registers (the second rung on that ladder) and addressing modes (the third rung) and everything else for now. Once you get to the first rung (that is all that CardIAC tries to get for you,) then you will be able to apply what you learn, and extend it to higher levels of assembly.
I got that from reading, now that I am not so tired the keyboard n screen looks strange. Lol. It incriments when finished with current inst i think, still ends up going through all the memory locations for the instructions on the program.
Title: Re: Assembly?
Post by: Chris Savage on Nov 13, 2025, 01:09 PM
Quote from: JKnightandKARR on Nov 13, 2025, 10:43 AMI got that from reading, now that I am not so tired the keyboard n screen looks strange. Lol. It incriments when finished with current inst i think, still ends up going through all the memory locations for the instructions on the program.

Well, it keeps executing instructions in a linear manner unless / until it hits a jump or branch. Were I familiar with this platform (Cardiac) I would write a short piece of code that explained it all easily.
Title: Re: Assembly?
Post by: Chris Savage on Nov 14, 2025, 08:39 AM
I promise, when you graduate to the Z80, I will be able to help you much more. While I have done ASM on the P1, it's a whole different beast. The P1 was fast enough that I often only wrote short little routines where timing was important, and relied on SPIN for the rest.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 15, 2025, 06:01 PM
Quote from: Chris Savage on Nov 14, 2025, 08:39 AMI promise, when you graduate to the Z80, I will be able to help you much more. While I have done ASM on the P1, it's a whole different beast. The P1 was fast enough that I often only wrote short little routines where timing was important, and relied on SPIN for the rest.
Ok. I keep forgetting to get thick paper to make the cardiac... too much todo not enough time...
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 16, 2025, 10:39 PM
Quote from: granz on Nov 02, 2025, 04:57 PMI have mentioned this before (possibly not here,) but the best way for a total beginner to learn assembly is CardIAC (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation).) I received one back in the mid-70s in high school, and actually have one still. I credit Bell Labs CardIAC for my understanding of assembly, and deep (electron-chasing level) knowledge of computer operations.

Michael Gardi (re-creater of many old systems) wrote an Instructable on building the CardIAC (https://www.instructables.com/CARDIAC-CARDboard-Illustrative-Aid-to-Computation-/ (https://www.instructables.com/CARDIAC-CARDboard-Illustrative-Aid-to-Computation-/).)

Start by downloading the excellent manual, from the 'Ible, and thoroughly reading all 63 pages (including covers, blank pages and lots of pictures.) After you have read the manual, build the CardIAC re-creation for yourself. Once you have built the "computer," go through the manual again, following all of the examples on your system.

Once you have done that, you could download an emulator (but not before you do the actual work on the cardboard computer - that is essential to the good understanding of assembler) and play around with some of the programs in the CardIAC manual. Next go to Drexel University's outstanding CardIAC page by Professor Stuart (https://www.cs.drexel.edu/~bls96/museum/cardiac.html (https://www.cs.drexel.edu/~bls96/museum/cardiac.html).) Go through Professor Stuart's page for some more advanced topics, like subroutines, recursion and others.

When you have gone through these things, you will have a pretty solid understanding of assembly, machine code and how a computer processes code. From that foundation you can go on to more advanced stuff like the Z-80 (an excellent CPU.)
Trying to print the Cardiac, but my desktop is currently being really stupid, so gotta download files on mt laptop n print from there...
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 18, 2025, 12:38 PM
Managed to get the files printed out, just need to assemble n figure out how to deal with some of the many holes... lol
Title: Re: Assembly?
Post by: granz on Nov 18, 2025, 03:30 PM
Quote from: JKnightandKARR on Nov 18, 2025, 12:38 PMManaged to get the files printed out, just need to assemble n figure out how to deal with some of the many holes... lol
I ignored the holes for the Lady Bug in the memory. It's easy enough to just place the Lady Bug next to the proper memory location.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 19, 2025, 04:13 PM
Quote from: granz on Nov 18, 2025, 03:30 PM
Quote from: JKnightandKARR on Nov 18, 2025, 12:38 PMManaged to get the files printed out, just need to assemble n figure out how to deal with some of the many holes... lol
I ignored the holes for the Lady Bug in the memory. It's easy enough to just place the Lady Bug next to the proper memory location.
Ok, I guess whatever works. lol
Title: Re: Assembly?
Post by: granz on Nov 20, 2025, 06:38 AM
Quote from: JKnightandKARR on Nov 19, 2025, 04:13 PM
Quote from: granz on Nov 18, 2025, 03:30 PM
Quote from: JKnightandKARR on Nov 18, 2025, 12:38 PMManaged to get the files printed out, just need to assemble n figure out how to deal with some of the many holes... lol
I ignored the holes for the Lady Bug in the memory. It's easy enough to just place the Lady Bug next to the proper memory location.
Ok, I guess whatever works. lol
I read that one person mounted the memory section on a piece of steel, and then attached tiny magnets to the Lady Bug, so that it wouldn't move when he placed it in a memory location.
Title: Re: Assembly?
Post by: JKnightandKARR on Nov 20, 2025, 10:36 AM
Quote from: granz on Nov 20, 2025, 06:38 AM
Quote from: JKnightandKARR on Nov 19, 2025, 04:13 PM
Quote from: granz on Nov 18, 2025, 03:30 PM
Quote from: JKnightandKARR on Nov 18, 2025, 12:38 PMManaged to get the files printed out, just need to assemble n figure out how to deal with some of the many holes... lol
I ignored the holes for the Lady Bug in the memory. It's easy enough to just place the Lady Bug next to the proper memory location.
Ok, I guess whatever works. lol
I read that one person mounted the memory section on a piece of steel, and then attached tiny magnets to the Lady Bug, so that it wouldn't move when he placed it in a memory location.
Thats a good idea.
Title: Re: Assembly?
Post by: Chris Savage on Nov 20, 2025, 05:36 PM
Quote from: granz on Nov 20, 2025, 06:38 AMI read that one person mounted the memory section on a piece of steel, and then attached tiny magnets to the Lady Bug, so that it wouldn't move when he placed it in a memory location.

Magnetic Lady Bug. Interesting. I have this mental image of a simulator that moves the Lady Bug automatically like the magnetic chess games do.  8)
Title: Re: Assembly?
Post by: Chris Savage on Dec 04, 2025, 10:59 AM
Quote from: granz on Nov 18, 2025, 03:30 PMI ignored the holes for the Lady Bug in the memory. It's easy enough to just place the Lady Bug next to the proper memory location.

How goes the assembly language learning?

Title: Re: Assembly?
Post by: JKnightandKARR on Dec 05, 2025, 06:40 PM
Quote from: Chris Savage on Dec 04, 2025, 10:59 AM
Quote from: granz on Nov 18, 2025, 03:30 PMI ignored the holes for the Lady Bug in the memory. It's easy enough to just place the Lady Bug next to the proper memory location.

How goes the assembly language learning?


Been busy lately, tried reading today at work, and eyes too tired.
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 07, 2025, 05:46 PM
Quote from: granz on Nov 18, 2025, 03:30 PM
Quote from: JKnightandKARR on Nov 18, 2025, 12:38 PMManaged to get the files printed out, just need to assemble n figure out how to deal with some of the many holes... lol
I ignored the holes for the Lady Bug in the memory. It's easy enough to just place the Lady Bug next to the proper memory location.
Happen to know the assembly ins for the kit?? I couldn't find them at all.
Title: Re: Assembly?
Post by: Chris Savage on Dec 08, 2025, 07:38 PM
Quote from: JKnightandKARR on Dec 07, 2025, 05:46 PMHappen to know the assembly ins for the kit?? I couldn't find them at all.

Not sure what you mean?  :-\
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 08, 2025, 08:10 PM
Quote from: Chris Savage on Dec 08, 2025, 07:38 PM
Quote from: JKnightandKARR on Dec 07, 2025, 05:46 PMHappen to know the assembly ins for the kit?? I couldn't find them at all.

Not sure what you mean?  :-\
To assemble the Cardiac when printed out
Title: Re: Assembly?
Post by: granz on Dec 08, 2025, 09:44 PM
Quote from: JKnightandKARR on Dec 07, 2025, 05:46 PMHappen to know the assembly ins for the kit?? I couldn't find them at all.
That Instructable that I mentioned above (https://www.instructables.com/CARDIAC-CARDboard-Illustrative-Aid-to-Computation-/) has complete assembly instructions. Is there something that you don't understand there?
Title: Re: Assembly?
Post by: Chris Savage on Dec 09, 2025, 09:01 AM
Quote from: granz on Dec 08, 2025, 09:44 PMThat Instructable that I mentioned above has complete assembly instructions.

Having clicked your link, I now understand what "cardiac" means. There is a link to a CARDboard Illustrative Aid to Computation (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation) Wikipedia page, which also mentions an emulator (https://www.kaleberg.com/software/cardiac/) for Mac with completely untested versions for Windows and Linux.

There appears to be another emulator (https://github.com/fzaca/CardiacVisualizer) written in RUST? I know nothing about that.

I bet if I studied the cardboard version a bit, I could create a Windows version with sliders that would accomplish the same thing without requiring assembly.
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 09, 2025, 11:53 AM
Quote from: granz on Dec 08, 2025, 09:44 PM
Quote from: JKnightandKARR on Dec 07, 2025, 05:46 PMHappen to know the assembly ins for the kit?? I couldn't find them at all.
That Instructable that I mentioned above (https://www.instructables.com/CARDIAC-CARDboard-Illustrative-Aid-to-Computation-/) has complete assembly instructions. Is there something that you don't understand there?
Sometimes for me, I need photos/videos when trying to do something, I'll reread it again later. work soon.
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 09, 2025, 11:54 AM
Quote from: Chris Savage on Dec 09, 2025, 09:01 AM
Quote from: granz on Dec 08, 2025, 09:44 PMThat Instructable that I mentioned above has complete assembly instructions.

Having clicked your link, I now understand what "cardiac" means. There is a link to a CARDboard Illustrative Aid to Computation (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation) Wikipedia page, which also mentions an emulator (https://www.kaleberg.com/software/cardiac/) for Mac with completely untested versions for Windows and Linux.

There appears to be another emulator (https://github.com/fzaca/CardiacVisualizer) written in RUST? I know nothing about that.

I bet if I studied the cardboard version a bit, I could create a Windows version with sliders that would accomplish the same thing without requiring assembly.
That'd be great. lol
Title: Re: Assembly?
Post by: granz on Dec 09, 2025, 01:33 PM
Quote from: Chris Savage on Dec 09, 2025, 09:01 AM
Quote from: granz on Dec 08, 2025, 09:44 PMThat Instructable that I mentioned above has complete assembly instructions.

Having clicked your link, I now understand what "cardiac" means. There is a link to a CARDboard Illustrative Aid to Computation (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation) Wikipedia page, which also mentions an emulator (https://www.kaleberg.com/software/cardiac/) for Mac with completely untested versions for Windows and Linux.

There appears to be another emulator (https://github.com/fzaca/CardiacVisualizer) written in RUST? I know nothing about that.

I bet if I studied the cardboard version a bit, I could create a Windows version with sliders that would accomplish the same thing without requiring assembly.
There are several: The an on-line emulator at Drexel University (https://www.cs.drexel.edu/~bls96/museum/cardsim.html) which is good, and it follows at the bottom of a GREAT page about CardIAC.

I used to have JCINC (https://web.archive.org/web/20060220033821/https://sourceforge.net/projects/cinc/) that works pretty well.

There is also an emulator in Microsoft Excel (https://web.archive.org/web/20140117081627/https://www.drdobbs.com/embedded-systems/cpu-design-on-paper/240153480,) written by Al Williams (from Dr. Dobbs Magazine - not sure if it is the same Al Williams from Hack-A-Day.)

NOTICE I did not push the emulators much before, because someone who really wants to get to truly understand assembly language really should do the hard part of running the CardIAC language by hand operating the computer, before they play with an emulator. The hand operation burns the machine steps into your brain, and then you can understand assembly better.
Title: Re: Assembly?
Post by: Chris Savage on Dec 09, 2025, 02:17 PM
Quote from: granz on Dec 09, 2025, 01:33 PMI did not push the emulators much before, because someone who really wants to get to truly understand assembly language really should do the hard part of running the CardIAC language by hand operating the computer, before they play with an emulator. The hand operation burns the machine steps into your brain, and then you can understand assembly better.

This is exactly why I encourage people to learn from an Abacus (https://en.wikipedia.org/wiki/Abacus) before using a calculator (https://en.wikipedia.org/wiki/Calculator).  ;)
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 09, 2025, 05:24 PM
Quote from: granz on Dec 09, 2025, 01:33 PM
Quote from: Chris Savage on Dec 09, 2025, 09:01 AM
Quote from: granz on Dec 08, 2025, 09:44 PMThat Instructable that I mentioned above has complete assembly instructions.

Having clicked your link, I now understand what "cardiac" means. There is a link to a CARDboard Illustrative Aid to Computation (https://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation) Wikipedia page, which also mentions an emulator (https://www.kaleberg.com/software/cardiac/) for Mac with completely untested versions for Windows and Linux.

There appears to be another emulator (https://github.com/fzaca/CardiacVisualizer) written in RUST? I know nothing about that.

I bet if I studied the cardboard version a bit, I could create a Windows version with sliders that would accomplish the same thing without requiring assembly.
There are several: The an on-line emulator at Drexel University (https://www.cs.drexel.edu/~bls96/museum/cardsim.html) which is good, and it follows at the bottom of a GREAT page about CardIAC.

I used to have JCINC (https://web.archive.org/web/20060220033821/https://sourceforge.net/projects/cinc/) that works pretty well.

There is also an emulator in Microsoft Excel (https://web.archive.org/web/20140117081627/https://www.drdobbs.com/embedded-systems/cpu-design-on-paper/240153480,) written by Al Williams (from Dr. Dobbs Magazine - not sure if it is the same Al Williams from Hack-A-Day.)

NOTICE I did not push the emulators much before, because someone who really wants to get to truly understand assembly language really should do the hard part of running the CardIAC language by hand operating the computer, before they play with an emulator. The hand operation burns the machine steps into your brain, and then you can understand assembly better.
That Drexel one, isn't that similar to Cardiac?
Title: Re: Assembly?
Post by: granz on Dec 09, 2025, 09:15 PM
Quote from: JKnightandKARR on Dec 09, 2025, 05:24 PMThat Drexel one, isn't that similar to Cardiac?
No, it is not similar, it IS a CardIAC computer emulator.
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 09, 2025, 11:05 PM
Quote from: granz on Dec 09, 2025, 09:15 PM
Quote from: JKnightandKARR on Dec 09, 2025, 05:24 PMThat Drexel one, isn't that similar to Cardiac?
No, it is not similar, it IS a CardIAC computer emulator.
Ok. Thanks
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 20, 2025, 01:03 AM
Well, Angela and me was in an Antique Mall in Columbus, welt out for my birthday, 12/18, and found a complete and in-box Timex Sinclair 1000, ZX81 clone, I have tried to hook it up, to no avail, then again, I don't have a way to hook it up correctly, tried running the Computer/TV switch box, double sided sticky tape still on the box and bas never been used, from the terminals that go onto the old screw antenna spots, with wires running into coax jack, no luxk, so, I wonder if my analog scope in X/Y mode would get me a view??, but not sure if it even working at moment... Its 9V power supply is pumping out 14V, and the schematics are posting 7-11V power, so it could be damaged. I need a new supply. I have an adjustable transformer, but the 4-way connector I have won't fit unless I pull the PCB out of the case.

I found 2 circuits, a transistor-based one from https://www.bytedelight.com/?page_id=3560 (https://www.bytedelight.com/?page_id=3560) had to use the Internet Archive to get info, RIP Ben, and one using a 555 timer.  There also might be a premade circuit I can get an install to convert the RF modulation signal into a Composite one, probly a grate idea todo since the new TVs don't have anyway I can hook it up, without buying screw terminals to Coax adapter.

Hillarious fact:
Me: *sees the system n call Granz to ask questions on it.*
Granz: *litterally packing similar system n accessories into a box to send to me at that exact time.*
lol
Title: Re: Assembly?
Post by: granz on Dec 20, 2025, 07:25 AM
Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMWell, Angela and me was in an Antique Mall in Columbus, welt out for my birthday, 12/18, and found a complete and in-box Timex Sinclair 1000, ZX81 clone, I have tried to hook it up, to no avail, then again, I don't have a way to hook it up correctly, tried running the Computer/TV switch box, double sided sticky tape still on the box and bas never been used, from the terminals that go onto the old screw antenna spots, with wires running into coax jack, no luxk, so, I wonder if my analog scope in X/Y mode would get me a view??
If you mean that you could see the computer's display on the scope, then no, you won't be able to see the display - the scope takes a totally different format input than what the television needs.

Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMIts 9V power supply is pumping out 14V, and the schematics are posting 7-11V power, so it could be damaged. I need a new supply.
Are you measuring the output of the power supply without any load? If you just hook up the meter to the output of the power supply by itself, then you will be getting a higher reading than the specified output. These older power supplies depended on the load to provide the voltage regulation, so without the load of the computer, you will read higher than what it will provide with the computer in the circuit.

Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMI have an adjustable transformer, but the 4-way connector I have won't fit unless I pull the PCB out of the case.
Do not hook up a transformer (adjustable or not) to power your TS-1000. A transformer provides an AC output, not the DC that your computer needs. Unless the TS-1000 has diode, and filtering, protection (it does not) on the power input, you will likely destroy the computer.

Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMI found 2 circuits, a transistor-based one from https://www.bytedelight.com/?page_id=3560 (https://www.bytedelight.com/?page_id=3560) had to use the Internet Archive to get info, RIP Ben, and one using a 555 timer.  There also might be a premade circuit I can get an install to convert the RF modulation signal into a Composite one, probly a grate idea todo since the new TVs don't have anyway I can hook it up, without buying screw terminals to Coax adapter.
Well, you won't get a circuit to take the output of the TS-1000 video output and convert it to composite video. There are circuits to get composite video out from the computer, but you will be taking the composite signal from the computer's PCB before the RF modulator, and running it through a small circuit (if I remember right, a single transistor, and a couple other parts - yes, Tezza [Terry Stewart] gives a simple circuit, and a complete description here: https://www.classic-computers.org.nz/blog/2016-01-03-composite-video-for-zx81.htm (https://www.classic-computers.org.nz/blog/2016-01-03-composite-video-for-zx81.htm). Terry is well known in the retro-computing community, and gives lots of good advice)

Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMHillarious fact:
Me: *sees the system n call Granz to ask questions on it.*
Granz: *litterally packing similar system n accessories into a box to send to me at that exact time.*
lol

Timing is everything, huh?
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 20, 2025, 12:35 PM
Quote from: granz on Dec 20, 2025, 07:25 AM
Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMWell, Angela and me was in an Antique Mall in Columbus, welt out for my birthday, 12/18, and found a complete and in-box Timex Sinclair 1000, ZX81 clone, I have tried to hook it up, to no avail, then again, I don't have a way to hook it up correctly, tried running the Computer/TV switch box, double sided sticky tape still on the box and bas never been used, from the terminals that go onto the old screw antenna spots, with wires running into coax jack, no luxk, so, I wonder if my analog scope in X/Y mode would get me a view??
If you mean that you could see the computer's display on the scope, then no, you won't be able to see the display - the scope takes a totally different format input than what the television needs.

Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMIts 9V power supply is pumping out 14V, and the schematics are posting 7-11V power, so it could be damaged. I need a new supply.
Are you measuring the output of the power supply without any load? If you just hook up the meter to the output of the power supply by itself, then you will be getting a higher reading than the specified output. These older power supplies depended on the load to provide the voltage regulation, so without the load of the computer, you will read higher than what it will provide with the computer in the circuit.

Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMI have an adjustable transformer, but the 4-way connector I have won't fit unless I pull the PCB out of the case.
Do not hook up a transformer (adjustable or not) to power your TS-1000. A transformer provides an AC output, not the DC that your computer needs. Unless the TS-1000 has diode, and filtering, protection (it does not) on the power input, you will likely destroy the computer.

Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMI found 2 circuits, a transistor-based one from https://www.bytedelight.com/?page_id=3560 (https://www.bytedelight.com/?page_id=3560) had to use the Internet Archive to get info, RIP Ben, and one using a 555 timer.  There also might be a premade circuit I can get an install to convert the RF modulation signal into a Composite one, probly a grate idea todo since the new TVs don't have anyway I can hook it up, without buying screw terminals to Coax adapter.
Well, you won't get a circuit to take the output of the TS-1000 video output and convert it to composite video. There are circuits to get composite video out from the computer, but you will be taking the composite signal from the computer's PCB before the RF modulator, and running it through a small circuit (if I remember right, a single transistor, and a couple other parts - yes, Tezza [Terry Stewart] gives a simple circuit, and a complete description here: https://www.classic-computers.org.nz/blog/2016-01-03-composite-video-for-zx81.htm (https://www.classic-computers.org.nz/blog/2016-01-03-composite-video-for-zx81.htm). Terry is well known in the retro-computing community, and gives lots of good advice)

Quote from: JKnightandKARR on Dec 20, 2025, 01:03 AMHillarious fact:
Me: *sees the system n call Granz to ask questions on it.*
Granz: *litterally packing similar system n accessories into a box to send to me at that exact time.*
lol

Timing is everything, huh?
Will have to figure out a way to hook it up then...

Ok, will plug it in and measure on pcb then.  Wrong adj transformer, the dc ones with the switch to set the voltage with the various adapters to plug it in to whatever is what I got.  Something like this: https://www.amazon.com/Belker-Adjustable-Universal-Household-Electronics/dp/B07NKZCWT1/ref=sr_1_5?xpid=rN9sDygczcwcc (https://www.amazon.com/Belker-Adjustable-Universal-Household-Electronics/dp/B07NKZCWT1/ref=sr_1_5?xpid=rN9sDygczcwcc)  I do
4n't have any of the large ac ones with the knob on top.

That's actually what I mean. That same circuit, along with one with a 555 timer. Below are the ones I got.
https://web.archive.org/web/20250515182348/https://www.bytedelight.com/?page_id=3560 (https://web.archive.org/web/20250515182348/https://www.bytedelight.com/?page_id=3560)
http://zx.zigg.net/misc-projects/ZX81_Video_Conditioning.pdf (http://zx.zigg.net/misc-projects/ZX81_Video_Conditioning.pdf)
Title: Re: Assembly?
Post by: Chris Savage on Dec 21, 2025, 09:06 PM
This is what I find online with regards to the output from the Timex Sinclair. @granz, does this look accurate?

The Timex Sinclair 1000's video output is an RF signal (UHF Channel 2 or 3 in NTSC regions) that requires an RF-to-Composite converter or an old analog TV with an RF input; it's a simple, monochrome, low-resolution signal, often needing mods for modern TVs, while later models like the TS 2068 offered better composite video options.

For the TS 1000 (and ZX81):


For the Timex Sinclair 2068 (TS 2068):

In Summary:
Think of the TS 1000 as needing a proper adapter to "speak" to modern screens, while the TS 2068 was better equipped but still had quirks; both relied on simple, blocky, monochrome graphics.
Title: Re: Assembly?
Post by: granz on Dec 21, 2025, 10:33 PM
Quote from: Chris Savage on Dec 21, 2025, 09:06 PMThis is what I find online with regards to the output from the Timex Sinclair. @granz, does this look accurate?
Yep, that about sums it up. It fits with what I remember, and know from more recent web finds.

That also reminded me of my old 2068, I wish I knew what happened to that - probably lost in one of my many moves - I miss it quite a bit. On one of my deployments to a war game, I brought my 2068, mounted inside an old .50 cal ammo box, along with a battery operated 5" television, and a tape recorder. It was my first "portable" computer. It was good for making my arm ache after carrying it for maybe 50 milliseconds.  :P
Title: Re: Assembly?
Post by: Chris Savage on Dec 21, 2025, 10:56 PM
Quote from: granz on Dec 21, 2025, 10:33 PMYep, that about sums it up. It fits with what I remember, and know from more recent web finds.

Do you think this would help (https://github.com/hoglet67/RGBtoHDMI/wiki/Quick-Start-Guide) him?
Title: Re: Assembly?
Post by: granz on Dec 22, 2025, 07:48 AM
Quote from: Chris Savage on Dec 21, 2025, 10:56 PMDo you think this would help (https://github.com/hoglet67/RGBtoHDMI/wiki/Quick-Start-Guide) him?
It looks like he could use it, RGB monitors (and this converter) just take three (or is it four) composite inputs, one each for red, green and blue. If he were to take the composite output from the TS-1000, and plug it into either of those inputs he could have a red-, green- or blue-screen output display for his computer. The manual does show that this converter should work with a TS-1000, in any of several different modes.

That said, it seems that a plain composite-in monitor, or television, would be far simpler.

@JKnightandKARR, do you have a composite-in monitor, or television?
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 22, 2025, 11:13 AM
Quote from: granz on Dec 22, 2025, 07:48 AM
Quote from: Chris Savage on Dec 21, 2025, 10:56 PMDo you think this would help (https://github.com/hoglet67/RGBtoHDMI/wiki/Quick-Start-Guide) him?
It looks like he could use it, RGB monitors (and this converter) just take three (or is it four) composite inputs, one each for red, green and blue. If he were to take the composite output from the TS-1000, and plug it into either of those inputs he could have a red-, green- or blue-screen output display for his computer. The manual does show that this converter should work with a TS-1000, in any of several different modes.

That said, it seems that a plain composite-in monitor, or television, would be far simpler.

@JKnightandKARR, do you have a composite-in monitor, or television?
Other then my smart tv's, no, which has composite, 1 of them component too i think, but my desktops monitors are hdmi/display port only.  I should have all parts todo the transistor mod. I've seen mods with something called back porch, but NO idea what that is or if even needed...
Title: Re: Assembly?
Post by: granz on Dec 22, 2025, 04:19 PM
Quote from: JKnightandKARR on Dec 22, 2025, 11:13 AM
Quote from: granz on Dec 22, 2025, 07:48 AM
Quote from: Chris Savage on Dec 21, 2025, 10:56 PMDo you think this would help (https://github.com/hoglet67/RGBtoHDMI/wiki/Quick-Start-Guide) him?
It looks like he could use it, RGB monitors (and this converter) just take three (or is it four) composite inputs, one each for red, green and blue. If he were to take the composite output from the TS-1000, and plug it into either of those inputs he could have a red-, green- or blue-screen output display for his computer. The manual does show that this converter should work with a TS-1000, in any of several different modes.

That said, it seems that a plain composite-in monitor, or television, would be far simpler.

@JKnightandKARR, do you have a composite-in monitor, or television?
Other then my smart tv's, no, which has composite, 1 of them component too i think, but my desktops monitors are hdmi/display port only.  I should have all parts todo the transistor mod. I've seen mods with something called back porch, but NO idea what that is or if even needed...
I do remember seeing "back porch" mod before, but don't remember what that is. At least you can test it out on your television, and then if either TS-1000 works, you can decide to either get another TV for a monitor for the Timex, or get a convertor for a VGA, or HDMI, monitor.
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 22, 2025, 07:40 PM
Quote from: granz on Dec 22, 2025, 04:19 PM
Quote from: JKnightandKARR on Dec 22, 2025, 11:13 AM
Quote from: granz on Dec 22, 2025, 07:48 AM
Quote from: Chris Savage on Dec 21, 2025, 10:56 PMDo you think this would help (https://github.com/hoglet67/RGBtoHDMI/wiki/Quick-Start-Guide) him?
It looks like he could use it, RGB monitors (and this converter) just take three (or is it four) composite inputs, one each for red, green and blue. If he were to take the composite output from the TS-1000, and plug it into either of those inputs he could have a red-, green- or blue-screen output display for his computer. The manual does show that this converter should work with a TS-1000, in any of several different modes.

That said, it seems that a plain composite-in monitor, or television, would be far simpler.

@JKnightandKARR, do you have a composite-in monitor, or television?
Other then my smart tv's, no, which has composite, 1 of them component too i think, but my desktops monitors are hdmi/display port only.  I should have all parts todo the transistor mod. I've seen mods with something called back porch, but NO idea what that is or if even needed...
I do remember seeing "back porch" mod before, but don't remember what that is. At least you can test it out on your television, and then if either TS-1000 works, you can decide to either get another TV for a monitor for the Timex, or get a convertor for a VGA, or HDMI, monitor.
(https://jknightandkarr.altervista.org/Computers/Screenshot_2025-12-22_193636.png)
https://jknightandkarr.altervista.org/Computers/Screenshot_2025-12-22_193636.png (https://jknightandkarr.altervista.org/Computers/Screenshot_2025-12-22_193636.png)
This is what I need to hook it to my tv.  Know any tricks I can use to do this?
Title: Re: Assembly?
Post by: Chris Savage on Dec 22, 2025, 11:09 PM
Quote from: granz on Dec 22, 2025, 04:19 PMI do remember seeing "back porch" mod before, but don't remember what that is. At least you can test it out on your television, and then if either TS-1000 works, you can decide to either get another TV for a monitor for the Timex, or get a convertor for a VGA, or HDMI, monitor.

In a video signal, the back porch is the duration between end of horizontal pulse and start of the next line with video information. As I recall, it happens when the beam returns for the next scan.

An image search gave me this:

Title: Re: Assembly?
Post by: Chris Savage on Dec 22, 2025, 11:12 PM
Quote from: JKnightandKARR on Dec 22, 2025, 07:40 PMThis is what I need to hook it to my tv.  Know any tricks I can use to do this?

These are matching transformers for when you're trying to connect a 300Ω 2-wire lead from an FM antenna to the 75Ω coaxial connector on the back of the TV.
Title: Re: Assembly?
Post by: granz on Dec 23, 2025, 05:45 AM
Quote from: Chris Savage on Dec 22, 2025, 11:09 PMIn a video signal, the back porch is the duration between end of horizontal pulse and start of the next line with video information. As I recall, it happens when the beam returns for the next scan.

Ahh yes, I remember now - thanks. It is part of the horizontal blanking time. It has been a long time since I was into television repair (the mid-1970s - over half a century ago! :o )
Title: Re: Assembly?
Post by: granz on Dec 23, 2025, 05:48 AM
Quote from: Chris Savage on Dec 22, 2025, 11:09 PM
Quote from: JKnightandKARR on Dec 22, 2025, 07:40 PMThis is what I need to hook it to my tv.  Know any tricks I can use to do this?

These are matching transformers for when you're trying to connect a 300Ω 2-wire lead from an FM antenna to the 75Ω coaxial connector on the back of the TV.
I'm pretty sure that there is a matching transformer in the box that I sent to you.
Title: Re: Assembly?
Post by: Chris Savage on Dec 23, 2025, 09:28 AM
When possible, I would prefer to use a composite signal over a TV (RF) signal any day. It's easier to get into modern equipment too. I still have video capture hardware for composite signals.
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 23, 2025, 11:11 AM
Quote from: granz on Dec 23, 2025, 05:48 AM
Quote from: Chris Savage on Dec 22, 2025, 11:09 PM
Quote from: JKnightandKARR on Dec 22, 2025, 07:40 PMThis is what I need to hook it to my tv.  Know any tricks I can use to do this?

These are matching transformers for when you're trying to connect a 300Ω 2-wire lead from an FM antenna to the 75Ω coaxial connector on the back of the TV.
I'm pretty sure that there is a matching transformer in the box that I sent to you.
Cool, thanks.

Quote from: Chris Savage on Dec 23, 2025, 09:28 AMWhen possible, I would prefer to use a composite signal over a TV (RF) signal any day. It's easier to get into modern equipment too. I still have video capture hardware for composite signals.
Agreed, the tv is supposed to have a bad signal, and going todo composite mod.
Title: Re: Assembly?
Post by: granz on Dec 23, 2025, 11:28 AM
Quote from: Chris Savage on Dec 23, 2025, 09:28 AMWhen possible, I would prefer to use a composite signal over a TV (RF) signal any day. It's easier to get into modern equipment too. I still have video capture hardware for composite signals.
I'm thinking that a modern-ish television with composite in will act more like a monitor (high enough resolution, etc.) The examples that I have seen which show the composite output from a ZX-81, or TS-1000, show a drastic improvement using composite out to a television, versus the same computer using RF output to the same television.
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 26, 2025, 12:44 AM
Quote from: granz on Dec 23, 2025, 05:48 AM
Quote from: Chris Savage on Dec 22, 2025, 11:09 PM
Quote from: JKnightandKARR on Dec 22, 2025, 07:40 PMThis is what I need to hook it to my tv.  Know any tricks I can use to do this?

These are matching transformers for when you're trying to connect a 300Ω 2-wire lead from an FM antenna to the 75Ω coaxial connector on the back of the TV.
I'm pretty sure that there is a matching transformer in the box that I sent to you.
I took the one I bought appart and have made the circuit using 2N3904, 33 ohm and 100 ohm resistors. I have the 33 ohm resistor soldered to the output, and the 100 ohm resistor to gnd, still need to hookup the input and 5V using ext wires, which I need to dig out.
Title: Re: Assembly?
Post by: Chris Savage on Dec 26, 2025, 09:45 AM
Quote from: JKnightandKARR on Dec 26, 2025, 12:44 AMI took the one I bought appart and have made the circuit using 2N3904, 33 ohm and 100 ohm resistors. I have the 33 ohm resistor soldered to the output, and the 100 ohm resistor to gnd, still need to hookup the input and 5V using ext wires, which I need to dig out.

Glad you're making progress on this, which begs the question...are you planning on using this for Z80 assembly learning? I'm asking since that's what this thread started on.  ;)
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 26, 2025, 11:25 AM
Quote from: Chris Savage on Dec 26, 2025, 09:45 AM
Quote from: JKnightandKARR on Dec 26, 2025, 12:44 AMI took the one I bought appart and have made the circuit using 2N3904, 33 ohm and 100 ohm resistors. I have the 33 ohm resistor soldered to the output, and the 100 ohm resistor to gnd, still need to hookup the input and 5V using ext wires, which I need to dig out.

Glad you're making progress on this, which begs the question...are you planning on using this for Z80 assembly learning? I'm asking since that's what this thread started on.  ;)
Yeah.
Title: Re: Assembly?
Post by: Chris Savage on Dec 26, 2025, 12:54 PM
Quote from: JKnightandKARR on Dec 26, 2025, 11:25 AMYeah.

Well then, I hope you're able to get the display working ASAP. We got work to do!  :D
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 26, 2025, 05:29 PM
Quote from: Chris Savage on Dec 26, 2025, 12:54 PM
Quote from: JKnightandKARR on Dec 26, 2025, 11:25 AMYeah.

Well then, I hope you're able to get the display working ASAP. We got work to do!  :D
I got wires soldered, but think the signal wire on wrong pin. Not sure if arrow pointing to a trace or the first wire on left next to edge, cause center isn't it...
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 30, 2025, 10:18 PM
Quote from: JKnightandKARR on Dec 26, 2025, 12:44 AM
Quote from: granz on Dec 23, 2025, 05:48 AM
Quote from: Chris Savage on Dec 22, 2025, 11:09 PM
Quote from: JKnightandKARR on Dec 22, 2025, 07:40 PMThis is what I need to hook it to my tv.  Know any tricks I can use to do this?

These are matching transformers for when you're trying to connect a 300Ω 2-wire lead from an FM antenna to the 75Ω coaxial connector on the back of the TV.
I'm pretty sure that there is a matching transformer in the box that I sent to you.
I took the one I bought appart and have made the circuit using 2N3904, 33 ohm and 100 ohm resistors. I have the 33 ohm resistor soldered to the output, and the 100 ohm resistor to gnd, still need to hookup the input and 5V using ext wires, which I need to dig out.
Well, there wasn't the adapter in the box, but I found one in the basement while I dig out the RF converter from my old NES/SNES systems, nothing there, I also tried the adapter I found in the box, nothing from it either, so while I can't try it on the system I got from the Antique mall, cut the wire from the pcb to the rca jack, so might go ahead and use my scope, to probe the PCB on the UCLA, whatever it's called, and see if there's an output signal on either system as well as where the signal pin is, also need the clips that came with my cheap LCR meter to test the transistor I used.

So either A)The systems so far don't work and have to be repaired, or B) Even though my TV has a coax jack, it DON'T like the systems at all...  Guess I could try them through my VCR on my other tv...
Title: Re: Assembly?
Post by: Chris Savage on Dec 30, 2025, 11:09 PM
Quote from: JKnightandKARR on Dec 30, 2025, 10:18 PMSo either A)The systems so far don't work and have to be repaired, or B) Even though my TV has a coax jack, it DON'T like the systems at all...  Guess I could try them through my VCR on my other tv...

Too bad you don't have something with a known good signal for verification.
Title: Re: Assembly?
Post by: granz on Dec 31, 2025, 08:31 AM
Quote from: Chris Savage on Dec 30, 2025, 11:09 PMToo bad you don't have something with a known good signal for verification.
Yeah, a television signal generator would be great.

Do you happen to have a Raspberry Pi Zero (2, W or 2W)? They have composite output:
(https://rpi-magazines.s3-eu-west-1.amazonaws.com/magpi/legacy-assets/2016/05/IMG_0029.jpg)
This is for the original Pi Zero (or Zero W), and the article about it is at: https://magazine.raspberrypi.com/articles/rca-pi-zero

The Zero 2 (and 2W) have solder pads for composite out:
(https://www.raspberrypi.com/documentation/computers/images/zero2-pad-diagram.png?hash=2e74c93201a0f4ee0c22848ce2cfa382)
And the forum posts about this are at: https://forums.raspberrypi.com/viewtopic.php?t=381237

Note that most Pi computers have composite out, I just mention the Pi Zero because of it's extremely low price. If you have the original Pi, it actually has an RCA connector on the board.
Title: Re: Assembly?
Post by: JKnightandKARR on Dec 31, 2025, 01:04 PM
Quote from: Chris Savage on Dec 30, 2025, 11:09 PM
Quote from: JKnightandKARR on Dec 30, 2025, 10:18 PMSo either A)The systems so far don't work and have to be repaired, or B) Even though my TV has a coax jack, it DON'T like the systems at all...  Guess I could try them through my VCR on my other tv...

Too bad you don't have something with a known good signal for verification.

I have an Atari 2600 amd the ZX81 power supply should work in it, same jack n voltage. Gotta try it.

Quote from: granz on Dec 31, 2025, 08:31 AM
Quote from: Chris Savage on Dec 30, 2025, 11:09 PMToo bad you don't have something with a known good signal for verification.
Yeah, a television signal generator would be great.

Do you happen to have a Raspberry Pi Zero (2, W or 2W)? They have composite output:
(https://rpi-magazines.s3-eu-west-1.amazonaws.com/magpi/legacy-assets/2016/05/IMG_0029.jpg)
This is for the original Pi Zero (or Zero W), and the article about it is at: https://magazine.raspberrypi.com/articles/rca-pi-zero

The Zero 2 (and 2W) have solder pads for composite out:
(https://www.raspberrypi.com/documentation/computers/images/zero2-pad-diagram.png?hash=2e74c93201a0f4ee0c22848ce2cfa382)
And the forum posts about this are at: https://forums.raspberrypi.com/viewtopic.php?t=381237

Note that most Pi computers have composite out, I just mention the Pi Zero because of it's extremely low price. If you have the original Pi, it actually has an RCA connector on the board.
I do not. Is there a way to hook them up to the system or something?
Title: Re: Assembly?
Post by: granz on Jan 01, 2026, 08:04 AM
Quote from: JKnightandKARR on Dec 31, 2025, 01:04 PMI do not. Is there a way to hook them up to the system or something?
I don't know what you mean by hook them up to the system or something. The Raspberry Pi is a system in itself. If you just load the Pi OS, with the changes mentioned in those links above, the Pi will give the desktop video out on the composite pins/RCA socket. You plug that into your monitor/television to verify that the monitor works. That will give you the something with a known good signal for verification that Chris mentioned.

Quote from: Chris Savage on Dec 30, 2025, 11:09 PM
Quote from: JKnightandKARR on Dec 30, 2025, 10:18 PMSo either A)The systems so far don't work and have to be repaired, or B) Even though my TV has a coax jack, it DON'T like the systems at all...  Guess I could try them through my VCR on my other tv...

Too bad you don't have something with a known good signal for verification.