I have implemented these words for U* and U/ in figforth 6502. When I try $100 $10 U* the answer is $0, the same with U/. Are the routines correct?
Thanks for any help. Jan
[code]; ; U* ; SCREEN 23 LINE 1 ; L386 .BYTE $82,"U",$AA .WORD L365 ; link to CMOVE USTAR .WORD *+2 LDA 2,X STA N STY 2,X LDA 3,X STA N+1 STY 3,X LDY #16 ; for 16 bits L396 ASL 2,X ROL 3,X ROL 0,X ROL 1,X BCC L411 CLC LDA N ADC 2,X STA 2,X LDA N+1 ADC 3,X STA 3,X LDA #0 ADC 0,X STA 0,X
L411 DEY BNE L396 JMP NEXT ; ; U/ ; SCREEN 24 LINE 1 ; L418 .BYTE $82,"U",$AF .WORD L386 ; link to U* USLAS .WORD *+2 LDA 4,X LDY 2,X STY 4,X ASL A STA 2,X LDA 5,X LDY 3,X STY 5,X ROL A STA 3,X LDA #16 STA N L433 ROL 4,X ROL 5,X SEC LDA 4,X SBC 0,X TAY LDA 5,X SBC 1,X BCC L444 STY 4,X STA 5,X L444 ROL 2,X ROL 3,X DEC N BNE L433 JMP POP/code]
|