Interesting, since you would need to have three different ways to initialize the serial port with the multiplexed hardware.
The result gets rolled right twice to set the high order bits in FE44. So depending on how you want the multiplexer set, you would enter it at a different point. Fascinating! Thanks for the clarification on this one. Kurt On Fri, Apr 10, 2026, at 3:59 PM, Kenneth Pettit wrote: > Hi Kurt, > > Oh, I okay, I see. Yeah, this took me a minute to figure out back in my days > of disassembling lots of M100 ROM code. > > Good old Mr. Gates found a way to really squeeze instructions into the ROM. > This is an example of a multi-entry point function. If you write code to JMP > 6F52H, then you get > > MVI A,01H > LXI B,023EH > LXI B,033EH > PUSH H > > This results in A being loaded with 1 > > But entering at 6F55H looks like: > > MVI A,02H > LXI B,033EH > PUSH H > > (i.e. A is loaded with 2) > > And entering at 6F58H looks like: > > MVI A,03H > PUSH H > > So this routine can be entered from 3 different locations to perform 3 > different functions (loaded into A as 01H, 02H or 03H) and it only costs a > couple of extra bytes. It uses dummy LXI B,#### opcodes (which only cost 1 > byte for the 01H) to "hide" the "MVI A,02" (3EH,02H) and "MVI A,03" (3EH,03H) > opcodes and make them look like the LXI B opcodes, loading B with dummy > values of 023EH and 033Eh). > > Ken > On 4/10/26 1:35 PM, Kurt McCullum wrote: >> Thanks Ken, >> >> I do have an example. >> >> 1. Put a breakpoint at 6F58 >> 2. Go to TELCOM and type TERM >> 3. Look at the Instruction Trace. It will say 6F58s MVI A, 03H >> >> 4. Go to the ROM source listing. >> You will notice there is no command at 6F58H. Instead it says >> ; ====================================================== >> ; Initialize RS232 or modem >> ; ====================================================== >> 6F52H (3EH) MVI A,01H >> 6F54H (01H) LXI B,023EH >> 6F57H (01H) LXI B,033EH >> 6F5AH (E5H) PUSH H >> >> To me it looks like the debugger got off track at the bottom of the ROM. >> >> Kurt >> >> >> On Fri, Apr 10, 2026, at 3:06 PM, Kenneth Pettit wrote: >>> Hi Kurt, >>> >>> Umm, I believe the disassembler *should* be looking at the ROM if I >>> remember correctly. Could just be a latent bug. Do you have examples of >>> discrepancies? >>> >>> Ken >>> On 4/10/26 12:35 PM, Kurt McCullum wrote: >>>> I am running into a problem with the disassembler for the main ROM in >>>> Virtual-T for the NEC 8201a. >>>> >>>> In particular, the RS232 initialize routines don't match what the ROM and >>>> debugger show as far as code. >>>> >>>> For the main ROM, is the disassembler actually looking at the ROM, or >>>> something else? >>>> >>>> Kurt >>
