/************************** I2ICE TUTORIAL SCREEN #45 **************************/ menu=1 define literally P = 'include scr.44 nolist' define literally R = 'include scr.45 nolist' define literally RTN = 'include scr.45 nolist' define literally N = 'include scr.46 nolist' define literally M = 'include scr.2 nolist' cls /*******************************************************************************/ ' ------------------------' 'A moment''s reflection reveals the problem. Array | SCR45: BYTE |' 'subscripts in PL/M-86 begin at 0; so, a five- | M = Go to main menu |' 'element array can have a maximum subscript of 4. | N = Next screen |' 'When emulation occurs and the array subscript is | P = Previous screen |' 'incremented to 5, the memory address pointer moves | Q = Quit tutorial |' 'beyond the end of the array to a memory location | R = Rewrite SCR45 |' 'used for something else--a location that by chance | SCR# = Screen desired |' 'has the value 31 (hex) in it. The 31 is then writ- ------------------------' 'ten to DECIMAL_DIGIT and creates our problem. ' ' ' 'We can confirm this diagnosis by looking at the value stored at the address' 'for DIGIT_STACK[4] (which should be 01) and at the next address. We could do' 'this with the following commands: WRITE_DECIMAL.DIGIT_STACK[4];WRITE_DECIMAL' '.DIGIT_STACK[5]. However, there is another way to display these memory bytes.' 'We can use one of the commands that displays memory: BYTE.' ' ' 'In the following command, the period before the array name directs the I2ICE' 'software to use the address--rather than the value--of the given array ele-' 'ment. Enter the following command:' ' BYTE .:CMAKER.WRITE_DECIMAL.DIGIT_STACK[4] LENGTH 2 ' '---- For information on BYTE and other memory commands, enter MOD_P --'