Yes, I saw the schematic. And I saw your videos. Nice videos. It looks like a fun project.
My problem was I couldn't figure out how it was working, and I'm actually still confused
For example, here is the code you posted to count on the LEDS:
Code:
1 ; ************************************************
2 ; * *
3 ; * A TEST PROGRAM TO PRACTICE TIMING LOOPS *
4 ; * *
5 ; ************************************************
6 ;
7 ;*****************************************************************************
8 ; INITIALIZE THE 8255 *
9 ;*****************************************************************************
10
11
12 00000000 B090 start: mov al,90h ;This sets the 8255 to operate
13 ;in Mode 0 (basic input output)
14 ;with port 0 as an input and
15 00000002 E603 out 03h,al ;ports 1 and 2 as outputs.
16 00000004 BB0000 mov bx,0x0000
17
18 00000007 E90F00 jmp begin ;Jump to the main loop.
19
20 0000000A C707FF6F waitasec: mov word [bx],0x6FFF ;Reset the countdown timer.
21 0000000E FF0F waitasec1: dec word [bx] ;Decrement it by 1 each time.
22
23 00000010 E601 out 01h,al ;Display the hex value at the
24 ;8255's port 1 on the LEDs.
25
26 00000012 813F0000 cmp word [bx],00h ;If the timer has counted down
27 ;all the way, return to the
28 ;'nexthex' label so that it
29 ;can move on to the next hex
30 ;value to display on the LEDs.
31
32 00000016 75F6 jnz waitasec1 ;If the counter hasn't counted
33 ;down to 00h yet, keep going.
34
35 00000018 C3 ret ;Here is where the zero flag
36 ;is checked. If the timer has
37 ;reached 00h, go to 'nexthex'.
38
39 00000019 B000 begin: mov al,00000000b ;Set all eight bits to 0.
40
41 0000001B E8ECFF call waitasec ;Start the countdown timer.
42
43 0000001E FEC0 nexthex: inc al ;Go on to the next hex value.
44
45 00000020 E8E7FF call waitasec ;Show the hex digit for a while.
46
47 00000023 3C2F cmp al,2Fh ;We're back in 'nexthex' again, so
48 ;we check to see if the second LED
49 ;has reached the maximum value.
50
51 00000025 75F7 jnz nexthex ;If not, move to the next hex
52 ;digit to display.
53
54 00000027 E9EFFF jmp begin ;If we have reached the last
55 ;possible value in the character
56 ;table, start all over again.
57
58 0000002A 00<rept> times 2032- ($-$$) db 0
59 000007F0 E90DF8 jmp start
60 000007F3 00<rept> times 12 db 0
61
Line 59 "jmp start" is at location 7F0h, and since the PROM is mapped to A19=1, this would get mapped to an absolute address of FFFF0h, which is the 8088 startup vector.
So far, so good.
The jmp start is coded as E9 0D F8, so it's a relative jump, back to the start location, which at the beginning of the PROM.
But if I go step by step, pretending to be the 8088 I have to deal with brain-hurting segment math:
At reset, CS = FFFFh, IP=0000h. So absolute program counter is at FFFF0h + 0000h = FFFF0h.
I fetch the instruction at FFFF0h, it's a 3 byte instruction, so I end up with CS = FFFFh, IP = 0003h, absolute address is FFFF3h.
The instruction is a relative jump with displacement of F80Dh.
So IP goes to 0003h + F80Dh = F810h. Now my absolute address is FFFF0h + F810h = 10F800h. But I only have 20 bits of absolute address, so it becomes 0F800h.
So I jump to 0F800h, which is in RAM, not PROM because A19=0 now. So it doesn't work?
But we have video proof that it works. I was grasping at straws trying to figure out why?
I thought, well what if instead of wiring up to the A19 pin (35), you wired it to the A15 pin (39) by mistake... then it would work. Very unlikely, I know. Or I thought you could have connected to the wrong output pin on the latch by mistake.. if you connected to pin 9, which leads back to pin A15, instead of pin 19 which leads back to pin A19.
That's why I was asking you to check the connection to A19. I was just trying to understand what's going on.