Example 3: Re-assembling a JAS program

Getting Started
...     Example 3: Re-assembling a JAS program

Once a JAS file has been assembled and loaded, it can be re-assembled and loaded using Assemble/Load | Current JAS Assemble/Load without requiring further file selection. This example also shows what happens when there is an error in a JAS program.

  1. After completing Example 1, re-edit ijvmtest.jas, remove the colon after OK, and save the changes:
    OK	BIPUSH 65
    	OUT
    	BIPUSH 79
    	OUT
    	BIPUSH 75
    	OUT
    	HALT
    
  2. On the simulator select from the Menu Bar Assemble/Load | Current JAS Assemble/Load The Assembling ijvmtest.jas window should appear with the following error message:
    IJVM Assembler...
    1433: Invalid instruction: ok
    1424: Invalid goto label: ok
    
  3. Close the window and re-edit the file: put back the colon and remove the lines
    BIPUSH 65
    OUT
    
    so that the program looks like it did originally.
  4. Try Step 2 again, this time without errors. Load the program, click the Reset button, and run it again. The result in the Output Console should be "OK", just like the first time.