Rz version 3.6   compiler  (old, 2015 and earlier)

This version target the output to S2 processor version 3 (s23).  The compiler outputs the S2 assembly language which can be converted to machine codes with S23 assembler (as23).  The output object file can be run with S23 simulator (s23). 

Two language features are added to this version.  The first one is "interrupt()".  This function is used to hold an interrupt service routine.  Only one such routine is supported.  The S23 simulator has the timer and interrupt implemented.  The second one is "asm(...)".  This is used to insert an assembly code into the final output.  It allows the mix of assembly language into Rz.  These features are used to support the writing of an operating system with Rz (project NOS).  

    See the example of the use of these two features here.  ems2.txt   
    Here is an example session of compiling and running a Rz program with S23 simulator.

Compile bubble.txt, put the output in bubble-s.txt

D:\rz36x\test>rz36 bubble.txt > bubble-s.txt

Assemble bubble-s.txt.  The output is a machine code bubble-s.obj
D:\rz36x\test>as23 bubble-s.txt

Run the object code with S23 simulator
D:\rz36x\test>s23 bubble-s.obj
load bubble-s.obj
>g
stop, execute 678 inst. 3642 clocks
>o
54321\n12345\n
>q

D:\rz36x\test>   

You can find more information about S2 processor here.  The page also links to a Javascript S23 simulator.

last update  12 Feb 2017