hi,
I’ve developed the development system for Mecrisp-Quintus 0.10 for RISC-V 32 IM on HiFive1 by Matthias Koch. Hope it can ease the programming of RISC-V mecrispForth.
It include the following items. For now I can simulate the RISC-V RV32I and RV32M instruction set and run tinyForth(tF) as the helping hand to debug the instructions as well as simulating mecrispForth without having to have hardware at hand.
( 5 ) RISC-V-TF87.F
( 4 ) RISC-V-hifive87org.f
( 3 ) RISC-V-SIMULATOR87.F
( 2 ) RISC-V-DISASSEMBLER87.F
( 1 ) RISC-V-ASSEMBLER87.F
cur-file --> D:\WIN32FOR\RISC-V88.F
I’d like to share this development system with people if they’d like.
May Forth be with you! holi
partial of the decompiled and disassembled list:
\ *******************************************************************************
\ *******************************************************************************
( 20400004 2040002C )
( 20400008 FFFFFFFF )
\ 2040000C 1C 2D 2D 2D 20 4D 65 63 72 69 73 70 2D 51 75 69 6E 74 75 73 20 30 2E 31 30 20 2D 2D 2D
\ ------------------------------------------------------------------------------- ( 1 1 )
code — Mecrisp-Quintus 0.10 —
( 2040002C 50 00 40 20 )
\ *******************************************************************************
\ *******************************************************************************
( 2040002C 20400050 )
( 20400030 00000042 )
\ 20400034 04 32 64 75 70
\ ------------------------------------------------------------------------------- ( 2 2 )
code 2dup
( 2040003C 00022283 ) R5=(R4+0)
( 20400040 FF820213 ) R4-8
( 20400044 00322223 ) (R4+4)=R3
( 20400048 00522023 ) (R4+0)=R5
( 2040004C 00008067 ) ret
\ -------------------------------------------------------------------------------
\ *******************************************************************************
\ *******************************************************************************
( 20400050 2040006C )
( 20400054 00000062 )
\ 20400058 05 32 64 72 6F 70
\ ------------------------------------------------------------------------------- ( 3 3 )
code 2drop
( 20400060 00422183 ) R3=(R4+4)
( 20400064 00820213 ) R4+8
( 20400068 00008067 ) ret
\ -------------------------------------------------------------------------------
\ *******************************************************************************
\ *******************************************************************************
( 2040006C 2040009C )
( 20400070 00000044 )
\ 20400074 05 32 73 77 61 70
\ ------------------------------------------------------------------------------- ( 4 4 )
code 2swap
( 2040007C 00018293 ) R5=R3+0
( 20400080 00422183 ) R3=(R4+4)
( 20400084 00522223 ) (R4+4)=R5
( 20400088 00022283 ) R5=(R4+0)
( 2040008C 00822303 ) R6=(R4+8)
( 20400090 00522423 ) (R4+8)=R5
( 20400094 00622023 ) (R4+0)=R6
( 20400098 00008067 ) ret
\ ------------------------------------------------------------------------------- ( 305 131 )
code quit
( 20405CC8 80000137 46810113 ) R2=80000468
( 20405CD0 80000237 26820213 ) R4=80000268
( 20405CD8 934FC0EF ) initflash \ 7E 20401E0C
( 20405CDC 80004337 FF030313 ) R6=80003FF0
( 20405CE4 00A00293 ) addi_R5,R0,0A
( 20405CE8 00532023 ) sw_R5,R6,0
( 20405CEC 80004337 FC830313 ) R6=80003FC8
( 20405CF4 00000293 ) addi_R5,R0,0
( 20405CF8 00532023 ) sw_R5,R6,0
( 20405CFC 80000337 00830313 ) R6=80000008
( 20405D04 00000293 ) addi_R5,R0,0
( 20405D08 00532023 ) sw_R5,R6,0
( 20405D0C 80004337 FD430313 ) R6=80003FD4
( 20405D14 00000293 ) addi_R5,R0,0
( 20405D18 00532023 ) sw_R5,R6,0
( 20405D1C 80004337 FCC30313 ) R6=80003FCC
( 20405D24 00000293 ) addi_R5,R0,0
( 20405D28 00532023 ) sw_R5,R6,0
( 20405D2C 800002B7 46828293 ) R5=80000468
( 20405D34 00532223 ) sw_R5,R6,4
( 20405D38 800042B7 FC428293 ) R5=80003FC4
( 20405D40 0002A283 ) lw_R5,[R5+0]
( 20405D44 00000293 ) addi_R5,R0,0
( 20405D48 B01FC0EF ) query \ B3 20402848
( 20405D4C D05FF0EF ) interpret \ 12F 20405A50
( 20405D50 D81FC0EF 05 20 6F 6B 2E 0A )
." ok."
( 20405D5C FEDFF06F ) jmp_20405D48