I first have made a disassembler, about one page of code, which is quite good : http://www.ForthSeen.de, see the section NewLisp. ( The experts are usually able to shrink my code another 30% .. ) .
Now I'm trying to write a Simulator for the GA144. For one processor it works quite good, now I'm thinking how to make 144 of them in parallel, and what might be the best data structures in newLISP.
This is the structure of one processor:
Code: Select all
; g8.lsp 19.October.2014 19:00
; test settings
( set 'DS '( 1 2 3 4 5 6 7 8 )) ; data stack
( set 'RS '( 11 12 13 14 15 16 17 18 )) ; return stack
( set 'S 9 'T 10 'R 19 'P 0 'A 0 'B 0 'ALU 0 'EXT 0 'CY 0 ) ; registers
( set 'RAM ( array 64 '( 0 ) )) ; RAM 64 words each 18 bits
( set 'ROM ( array 64 '( 0 ) )) ; ROM 64 words dto.
( set 'IO '( (0x15D "io" 0x15555 ) ; IO-section
(0x141 "data" 0 ) (0x145 "---u" 0 ) (0x175 "--l-" 0 ) (0x165 "--lu" 0 )
(0x115 "-d--" 0 ) (0x105 "-d-u" 0 ) (0x135 "-dl-" 0 ) (0x125 "-dlu" 0 )
(0x1D5 "r---" 0 ) (0x1C5 "r--u" 0 ) (0x1F5 "r-l-" 0 ) (0x1E5 "r-lu" 0 )
(0x195 "rd--" 0 ) (0x185 "rd-u" 0 ) (0x1B5 "rdl-" 0 ) (0x1A5 "rdlu" 0 ) ))
- different context's ?
- a big Array ?
- big lists of list ..