/******************** ICE-1500 (DOS) TUTORIAL SCREEN #23 **********************/ menu = 1 map 0k length 12k ice load messg namescope = rotate DEFINE PROC CRT = DO CURY = 20T CHAR .DISP_BUFFER LENGTH BUFF_SIZE RETURN FALSE END DEFINE BRKREG CRTBRK = CHAR_DISPLAY CALL CRT DEFINE PROC SHOWVAR = DO /* SHOWVAR PROCEDURE (show variables) */ BASE = decimal /* Change base to decimal */ WRITE SCREEN(14,21)'Buff_size = ',BUFF_SIZE /* Display BUFF_SIZE */ WRITE SCREEN(33,21)'Index_ptr = ',INDEX_PTR /* Display INDEX_PTR */ BASE = hex /* Change base back to HEX */ RETURN FALSE /* Continue emulation upon return */ END /* End of SHOWVAR procedure */ DEFINE BRKREG SHOWBRK = #29 CALL SHOWVAR define literally PR = 'include scr.22 nolist' define literally R = 'include scr.23 nolist' define literally RTN = 'include scr.23 nolist' define literally N = 'include scr.24 nolist' define literally M = 'include scr.2 nolist' cls /******************************************************************************/ ' ------------------------' 'Now run the program using break registers to call | SCR23: GO USING |' 'the CRT and SHOWVAR procedures. Enter: | N = Next screen |' ' | R = Rewrite SCR23 |' ' GO FROM 0 USING CRTBRK,SHOWBRK | PR = Previous screen |' ' | M = Go to main menu |' 'As you can see, the index pointer''s maximum value | Q = Quit tutorial |' 'only reaches 33 before being reset to 1, whereas | SCR# = Screen desired |' 'the message is 34 characters long (BUFF_SIZE). The ------------------------' 'ROTATE loop is not executing the correct number of times.' ' ' 'Use the and keys to stop emulation.' ' ' '-------------------------------------------------------------------------------'