# SPDX-License-Identifier: MIT # F3850 instruction cycles, ROMC states and status effects: a transcription of the FACTS in # Table 3 "Instruction Cycle Execution and Timing" of Fairchild's F3850 data sheet, as printed # in the 1982 Fairchild Microprocessor Products Data Book, pp. 3-21 to 3-25 (PDF pages 42-46; # reference/docs/1982_Fairchild_Microprocessor_Products_Data_Book.pdf, pinned by SHA-256 in # scripts/pinned_files.json). Evidence tag: DOC. Transcribed by reading the page images # (2026-11-26); re-check each row against the page before generated code depends on it. # # Columns (tab-separated): # opcode hex first byte, or a range lo-hi; INTRPT and RESET are the two sequences that are # not instructions # mnemonic Fairchild's mnemonic and operand form # flags O Z C S: "-" unaffected, "0" cleared, "1" set, "x" set from the result # intr "x": interrupts are not taken at the end of this instruction (Table 3 column); # "y" marks a sequence with a cycle that clears ICB (DI, INTRPT, RESET) # cycles space-separated LENGTH:ROMC items, in order; S = short (4 phi clocks), # L = long (6 phi clocks). Branches give two sequences separated by " | ": # first the not-taken path, then the taken path. # clocks phi clocks for each path (S=4, L=6), derived here from the cycles column # function the data book's function column, condensed opcode mnemonic flags intr cycles clocks function 00 LR A,KU ---- S:00 4 A <- r12 01 LR A,KL ---- S:00 4 A <- r13 02 LR A,QU ---- S:00 4 A <- r14 03 LR A,QL ---- S:00 4 A <- r15 04 LR KU,A ---- S:00 4 r12 <- A 05 LR KL,A ---- S:00 4 r13 <- A 06 LR QU,A ---- S:00 4 r14 <- A 07 LR QL,A ---- S:00 4 r15 <- A 08 LR K,P ---- L:07 L:0B S:00 16 r12 <- PC1U (bus from the memory chip owning PC1); r13 <- PC1L 09 LR P,K ---- L:15 L:18 S:00 16 PC1U <- r12; PC1L <- r13 (CPU drives the bus) 0A LR A,IS ---- S:00 4 A <- ISAR 0B LR IS,A ---- S:00 4 ISAR <- A (6 bits) 0C PK ---- x L:12 L:14 S:00 16 PC1 <- PC0; PC0L <- r13; PC0U <- r12 0D LR P0,Q ---- x L:17 L:14 S:00 16 PC0L <- r15; PC0U <- r14 0E LR Q,DC ---- L:06 L:09 S:00 16 r14 <- DC0U; r15 <- DC0L (bus from the memory chip owning DC0) 0F LR DC,Q ---- L:16 L:19 S:00 16 DC0U <- r14; DC0L <- r15 10 LR DC,H ---- L:16 L:19 S:00 16 DC0U <- r10; DC0L <- r11 11 LR H,DC ---- L:06 L:09 S:00 16 r10 <- DC0U; r11 <- DC0L 12 SR 1 0x01 S:00 4 A >>= 1, zero fill 13 SL 1 0x0x S:00 4 A <<= 1, zero fill 14 SR 4 0x01 S:00 4 A >>= 4, zero fill 15 SL 4 0x0x S:00 4 A <<= 4, zero fill 16 LM ---- L:02 S:00 10 A <- (DC0); DC0 += 1 17 ST ---- L:05 S:00 10 (DC0) <- A; DC0 += 1 18 COM 0x0x S:00 4 A <- A xor FFh 19 LNK xxxx S:00 4 A <- A + C 1A DI ---- y S:1C S:00 8 ICB <- 0 1B EI ---- x S:1C S:00 8 ICB <- 1 1C POP ---- x S:04 S:00 8 PC0 <- PC1 1D LR W,J xxxx x S:1C S:00 8 W <- r9 (ICB too) 1E LR J,W ---- S:00 4 r9 <- W 1F INC xxxx S:00 4 A <- A + 1 20 LI aa ---- L:03 S:00 10 A <- aa 21 NI aa 0x0x L:03 S:00 10 A <- A and aa 22 OI aa 0x0x L:03 S:00 10 A <- A or aa 23 XI aa 0x0x L:03 S:00 10 A <- A xor aa 24 AI aa xxxx L:03 S:00 10 A <- A + aa 25 CI aa xxxx L:03 S:00 10 flags from aa + not(A) + 1; A unchanged 26 IN pp 0x0x L:03 L:1B S:00 16 bus <- pp (port address, fetched by ROMC 03); A <- port pp 27 OUT pp ---- x L:03 L:1A S:00 16 bus <- pp; port pp <- A 28 PI iijj ---- x L:03 S:0D L:0C L:14 S:00 26 A <- ii; PC1 <- PC0 + 1; PC0L <- jj; PC0U <- A (A is left holding ii) 29 JMP iijj ---- x L:03 L:0C L:14 S:00 22 A <- ii; PC0L <- jj; PC0U <- A (A is left holding ii) 2A DCI iijj ---- L:11 S:03 L:0E S:03 S:00 24 DC0U <- ii; PC0 += 1; DC0L <- jj; PC0 += 1 2B NOP ---- S:00 4 2C XDC ---- S:1D S:00 8 DC0 <-> DC1 in chips that have DC1; chips without DC1 do nothing 2D-2F (not listed) ???? ? ? not in Table 3: unknown (handoff brief U-list) 30-3E DS r xxxx L:00 6 r <- r + FFh (decrement); one long cycle that is also the next fetch 3F DS (r=15) ???? ? ? r = 15 is not a defined operand (unknown) 40-4E LR A,r ---- S:00 4 A <- r 50-5E LR r,A ---- S:00 4 r <- A 60-67 LISU e ---- S:00 4 ISAR[5:3] <- e 68-6F LISL e ---- S:00 4 ISAR[2:0] <- e 70-7F LIS a ---- S:00 4 A <- 0a (70h is spelled CLR) 80-87 BT e,ii ---- S:1C S:03 S:00 | S:1C L:01 S:00 12 | 14 if (e and W[2:0]) != 0: PC0 <- (address of ii) + ii, via ROMC 01; else ROMC 03 skips ii 88 AM xxxx L:02 S:00 10 A <- A + (DC0) binary; DC0 += 1 89 AMD xxxx L:02 S:00 10 A <- A + (DC0) decimal; DC0 += 1 8A NM 0x0x L:02 S:00 10 A <- A and (DC0); DC0 += 1 8B OM 0x0x L:02 S:00 10 A <- A or (DC0); DC0 += 1 8C XM 0x0x L:02 S:00 10 A <- A xor (DC0); DC0 += 1 8D CM xxxx L:02 S:00 10 flags from (DC0) + not(A) + 1; DC0 += 1 8E ADC ---- L:0A S:00 10 DC0 <- DC0 + A (A signed; CPU drives A) 8F BR7 ii ---- S:03 S:00 | L:01 S:00 8 | 10 if ISARL != 7: PC0 <- (address of ii) + ii; else skip ii 90-9F BF t,ii ---- S:1C S:03 S:00 | S:1C L:01 S:00 12 | 14 if (t and W[3:0]) == 0: PC0 <- (address of ii) + ii; else skip ii (90h = BR, always) A0-A1 INS 0..1 0x0x S:1C S:00 8 A <- CPU port 0 or 1 (timing: data book Figure 11) A2-A3 INS 2..3 ???? ? ? not in Table 3 (ports 2 and 3 are reserved): unknown A4-AF INS 4..15 0x0x L:1C L:1B S:00 16 bus <- port address (4-15); A <- port B0-B1 OUTS 0..1 ---- S:1C S:00 8 CPU port 0 or 1 <- A (timing: Figure 11) B2-B3 OUTS 2..3 ???? ? ? not in Table 3: unknown B4-BF OUTS 4..15 ---- x L:1C L:1A S:00 16 bus <- port address; port <- A C0-CE AS r xxxx S:00 4 A <- A + r binary D0-DE ASD r xxxx S:1C S:00 8 A <- A + r decimal E0-EE XS r 0x0x S:00 4 A <- A xor r F0-FE NS r 0x0x S:00 4 A <- A and r CF,DF,EF,FF,4F,5F (r=15) ???? ? ? r = 15 is not a defined operand (unknown) INTRPT interrupt acknowledge ---- y L:1C L:0F L:13 S:00 22 idle; PC1 <- PC0, PC0L <- vector low (ROMC 0F); PC0U <- vector high (ROMC 13, ICB cleared); fetch; no interrupt after it (x) RESET reset ---- y S:1C L:08 S:00 14 idle; PC1 <- PC0, PC0 <- 0 (CPU drives zero, ROMC 08); fetch; no interrupt after it (x)