ecse  

the nut compiler (nut) and code generator (gen2) runs on the vm "nsim32".  The base compiler is "nut32".  

nut is a full-set compiler. The additional operators are: *, /, &, <<, >>.  (they are used to write the nut compiler)
nut.obj is compiled by nut32.exe

gen2 is a full-set code generator.  
gen2.obj is compiled by nut32.exe

(gen4 optimises s-code for "inc" and "dec".)

Sx processor simulator is sx1.exe
(it uses mpgm.txt and mspec.h, sx1 does "inc/dec")
sx1 outputs "prof.txt", the profile.

nut system call  (based on nsim32.exe)

sys 1   print integer to stdout
sys 2   print character to stdout
sys 3   tokenise from stdin
sys 9   return heap pointer  (M[.])
sys 10  print readable n-code
sys 11  readinfile from stdin
sys 12  print source line number
sys 13  halt

What are supported by sx?

sx does not have to support the compiler or code generator specific functions.  But it has to support noss.

sys 1
sys 2
sys 13

support nos

sys 20   enable interrupt
sys 21   disable interrupt
sys 22   block current process
sys 23   save C-state
sys 24   restore C-state

sx-noss

noss includes sx0. sx0 is cleaner than sx1. sx0 comes from sx0/sxsim. as it is, it does not have "inc/dec" (in microprogram, sxbit.h)

13 August 2006

