Very interesting, I think I’m going to make one, as I still have an old 8085 processor and some 8155 chips somewhere. Now, I’m familiar with assembler programming, but I don’t understand how the 8085 adresses all 256 I/O ports with the IN and OUT commands when there are only 6 adress locations for I/O and internal Timer. By the way, I have an old Bingo machine operated by 8085 based hard- and software, communicating with the periphery through four 8155’s. I managed to retrieve the opcode from the EPROM’s and disassembled the code, and there’s not one IN or OUT instruction used, while the scheme shows clear that at least one of the 8155’s is offered multiple statuses through a matrix covering 128 (16 x 8) contacts and/or dipswitch settings. Beside the datasheet of the 8155, there is, sadly, not much to find about the 8155 on the internet. If only someone could point me in the right direction…
I may not understand the question entirely, but maybe this will help….
The 8155 and others are agnostic about what instruction is used to access them, I.e., they just have an input pin that specifies if memory or I/O is being accessed and an enable pin. Not coincidentally, the 8085 has an output that is activated with the use of an IN or OUT command to indicate it is a memory or an I/O bus cycle. Since the data byte of the IN and OUT instruction can go from 00H to FFH there are 256 possible I/o ports that can be accessed using IN or OUT instructions. It is up to the hardware to decode which chip is being addressed during the memory or I/o cycle, I.e., by looking at the address lines and selecting or enabling a particular chip and also using the IO/M line to see if it is a memory or I/o. So while the 8085 can address 256 I/o ports, only the specific 8155 (or other I/o device) that occupies that address space should respond to the read or write instruction.
This is very related to your second question about how your old bingo machine works, if there are no IN or OUT instructions it likely is using memory mapped ports where I/o bus cycles are not distinguished from memory bus cycles, but rather the IO/M line is tied to an address bit. When using memory mapped I/o, the code can address a port using things like a STA LDA instructions or any other memory access instruction. This allows for much more convenient port access using a variety of commands AND provides for thousands of ports to be accessed.
Go back and look at your bingo code with an eye towards the memory access actually addressing I/o ports and you may be able to see what is going on. There is likely a block of memory with a certain address bit driving the 8155 IO/M line. When that line is high they are accessing an I/o port. When low, they are accessing memory.
Very interesting, I think I’m going to make one, as I still have an old 8085 processor and some 8155 chips somewhere. Now, I’m familiar with assembler programming, but I don’t understand how the 8085 adresses all 256 I/O ports with the IN and OUT commands when there are only 6 adress locations for I/O and internal Timer. By the way, I have an old Bingo machine operated by 8085 based hard- and software, communicating with the periphery through four 8155’s. I managed to retrieve the opcode from the EPROM’s and disassembled the code, and there’s not one IN or OUT instruction used, while the scheme shows clear that at least one of the 8155’s is offered multiple statuses through a matrix covering 128 (16 x 8) contacts and/or dipswitch settings. Beside the datasheet of the 8155, there is, sadly, not much to find about the 8155 on the internet. If only someone could point me in the right direction…
I may not understand the question entirely, but maybe this will help….
The 8155 and others are agnostic about what instruction is used to access them, I.e., they just have an input pin that specifies if memory or I/O is being accessed and an enable pin. Not coincidentally, the 8085 has an output that is activated with the use of an IN or OUT command to indicate it is a memory or an I/O bus cycle. Since the data byte of the IN and OUT instruction can go from 00H to FFH there are 256 possible I/o ports that can be accessed using IN or OUT instructions. It is up to the hardware to decode which chip is being addressed during the memory or I/o cycle, I.e., by looking at the address lines and selecting or enabling a particular chip and also using the IO/M line to see if it is a memory or I/o. So while the 8085 can address 256 I/o ports, only the specific 8155 (or other I/o device) that occupies that address space should respond to the read or write instruction.
This is very related to your second question about how your old bingo machine works, if there are no IN or OUT instructions it likely is using memory mapped ports where I/o bus cycles are not distinguished from memory bus cycles, but rather the IO/M line is tied to an address bit. When using memory mapped I/o, the code can address a port using things like a STA LDA instructions or any other memory access instruction. This allows for much more convenient port access using a variety of commands AND provides for thousands of ports to be accessed.
Go back and look at your bingo code with an eye towards the memory access actually addressing I/o ports and you may be able to see what is going on. There is likely a block of memory with a certain address bit driving the 8155 IO/M line. When that line is high they are accessing an I/o port. When low, they are accessing memory.
Regards
Craig