I knew of a U/ bug in 6502 fig-forth (it was well publicized) but never heard of issues with U*. This prompted some digging. There's a discrepancy in the U* code published in the Fig Installation Manual (Nov 1980) and what's contained in Fig 6502 Rel 1.1 asm listing (Sep 1980) from
http://www.forth.org/fig-forth/contents.htmlBelow is a chart comparing the code for U* U/ found in several '6502 fig-forth'.
Code:
; U* U/ code comparison for 6502 Fig-Forth
; FIG INST MANUAL 6502 Rel 1.1 ASM HES 64FORTH AIM-65 FORTH
CODE U*
SEC LDA, LDA 2,X LDA 2,X LDA 2,X
N STA, STA N STA N STA N
SEC STY, STY 2,X STY 2,X STY 2,X
SEC 1+ LDA, LDA 3,X LDA 3,X LDA 3,X
N 1+ STA, STA N+1 STA N+1 STA N+1
SEC 1+ STY, STY 3,X STY 3,X STY 3,X
16 # LDY, LDY #16 LDY #16 LDY #16
BEGIN, L396 L84DC LB464
BOT 2+ ASL, ASL 2,X ASL 2,X ASL 2,X
BOT 3 + ROL, ROL 3,X ROL 3,X ROL 3,X
BOT ROL, ROL 0,X ROL 0,X ROL 0,X
BOT 1+ ROL, ROL 1,X ROL 1,X ROL 1,X
CS IF, BCC L411 BCC L84FB BCC LB483
CLC, CLC CLC CLC
N LDA, LDA N LDA N LDA N
BOT 2 + ADC, ADC 2,X ADC 2,X ADC 2,X
BOT 2 + STA, STA 2,X STA 2,X STA 2,X
N 1+ LDA, LDA N+1 LDA N+1 LDA N+1
BOT 3 + ADC, ADC 3,X ADC 3,X ADC 3,X
BOT 3 + STA, STA 3,X STA 3,X STA 3,X
CS IF, BCC L84FB BCC LB483
BOT INC, LDA #0 INC 0,X INC 0,X
0= IF, ADC 0,X BNE L84FB BNE LB483
BOT 1+ INC, STA 0,X INC 1,X INC 1,X
ENDIF, ENDIF, ENDIF, L411 L84FB LB483
DEY, DEY DEY DEY
0= UNTIL, BNE L396 BNE L84DC BNE LB464
NEXT JMP, JMP NEXT JMP NEXT JMP NEXT
; FIG INST MANUAL 6502 Rel 1.1 ASM HES 64FORTH AIM-65 FORTH
CODE U/
STY N+1
SEC 2 + LDA, LDA 4,X LDA 4,X LDA 4,X
SEC LDY, LDY 2,X LDY 2,X LDY 2,X
SEC 2 + STY, STY 4,X STY 4,X STY 4,X
.A ASL, ASL A ASL A ASL A
SEC STA, STA 2,X STA 2,X STA 2,X
SEC 3 + LDA, LDA 5,X LDA 5,X LDA 5,X
SEC 1+ LDY, LDY 3,X LDY 3,X LDY 3,X
SEC 3 + STY, STY 5,X STY 5,X STY 5,X
.A ROL, ROL A ROL A ROL A
SEC 1+ STA, STA 3,X STA 3,X STA 3,X
16 # LDA, LDA #16 LDA #16 LDA #16
N STA, STA N STA N STA N
BEGIN, L433 L8520 LB4A6
SEC 2 + ROL, ROL 4,X ROL 4,X ROL 4,X
SEC 3 + ROL, ROL 5,X ROL 5,X ROL 5,X
ROL N+1 PHP
SEC, SEC SEC SEC
SEC 2 + LDA, LDA 4,X LDA 4,X LDA 4,X
BOT SBC, SBC 0,X SBC 0,X SBC 0,X
TAY, TAY TAY TAY
SEC 3 + LDA, LDA 5,X LDA 5,X LDA 5,X
BOT 1+ SBC, SBC 1,X SBC 1,X SBC 1,X
PHA BCC LB4BF
LDA N+1 STY 4,X
SBC #0 STA 5,X
LDA #0 PLP
STA N+1 SEC
PLA BCS LB4C6
LB4BF PLP
CS IF, BCC L444 BCC L8540 BCC LB4C6
SEC 2+ STY, STY 4,X STY 4,X STY 4,X
SEC 3 + STA, STA 5,X STA 5,X STA 5,X
THEN, L444 L8540 LB4C6
SEC ROL, ROL 2,X ROL 2,X ROL 2,X
SEC 1+ ROL, ROL 3,X ROL 3,X ROL 3,X
N DEC, DEC N DEC N DEC N
0= END, BNE L433 BNE L8520 BNE LB4A6
POP JMP, JMP POP JMP POP JMP POP