It may be very simple, but I cannot understand it.
I use ports 8255 A and B to enter a word. I have something like:
PORT_A EQU 0008h
PORT_B EQU 000Ah
Later in the code segment, I have a part that does this:
MOV DX, PORT_B
IN AL, DX
MOV AH, AL
MOV DX, PORT_A
IN AL, DX
MOV DX, AX
I have a few questions. What effectively does MOV DX, PORT_B? Does it save the address PORT_B in DX? Why does it enter the high byte in AL and then move AL to AH instead of just writing it as IN AH, DX?
What do you need to make decisions "0008h" and "000Ah" for addresses for ports A and B? I only ever worked with assembly 8085, and there I would not have chosen 000A (0000 0000 0000 1010b), if I had chosen 0008h (0000 0000 0000 1000b) before, because bit A3 overlaps (for example, d select 0001h (.. .0001b) and 0002h (.... 0010b) so that no bits overlap).