INCLUDE '($SSDEF)' INCLUDE '($SMGDEF)' INTEGER*4 SYS$HIBER INTEGER*4 SYS$SETIMR INTEGER*4 SYS$BINTIM INTEGER*4 SYS$WAKE INTEGER*4 SMG$CREATE_PASTEBOARD INTEGER*4 SMG$ERASE_PASTEBOARD INTEGER*4 SMG$ERASE_DISPLAY INTEGER*4 SMG$CREATE_VIRTUAL_DISPLAY INTEGER*4 SMG$PASTE_VIRTUAL_DISPLAY INTEGER*4 SMG$UNPASTE_VIRTUAL_DISPLAY INTEGER*4 SMG$ENABLE_UNSOLICITED_INPUT INTEGER*4 SMG$CREATE_VIRTUAL_KEYBOARD INTEGER*4 SMG$READ_KEYSTROKE INTEGER*4 SMG$SET_OUT_OF_BAND_ASTS INTEGER*4 SMG$READ_STRING INTEGER*4 SMG$RING_BELL INTEGER*4 SMG$SET_CURSOR_MODE INTEGER*4 SMG$PUT_CHARS INTEGER*4 SMG$BEGIN_DISPLAY_UPDATE INTEGER*4 SMG$END_DISPLAY_UPDATE INTEGER*4 SMG$BEGIN_PASTEBOARD_UPDATE INTEGER*4 SMG$END_PASTEBOARD_UPDATE INTEGER*4 SMG$LABEL_BORDER INTEGER*4 SMG$SAVE_PHYSICAL_SCREEN INTEGER*4 SMG$RESTORE_PHYSICAL_SCREEN INTEGER*4 STATUS,ERR INTEGER*4 P1,BOARD,SCORE,DISPLAY,KID,TERM,SCORE_BOARD,SAVE_ID INTEGER*4 FULL_ROWS_BOARD,FULL_ROWS,STATUS_DISP INTEGER*4 ROUND_DISP,FULL_NEEDED_DISP,HIGH_SCORE,HIGH_SCORE_DISP INTEGER*4 HIGHEST_ROW,ROUND,FULL_NEEDED,OBJECTS_DISP,CLEAR_DISP INTEGER*4 OBJ_COUNT(7),OBJ_COUNT_ROW(7)/2,5,8,11,13,16,19/ INTEGER*4 BOARD_ROWS,BOARD_COLS PARAMETER (BOARD_ROWS=20) PARAMETER (BOARD_COLS=30) INTEGER*4 SEED(2),INDEX REAL*4 RANDOM INTEGER*2 CW,CCW,DROPPED,FILLED,ROUND_NUM,FULL_NEEDED_NUM,HIGH,OBJ_NUM INTEGER*2 HIGH_WRITE PARAMETER (CW = 1) PARAMETER (CCW = 2) PARAMETER (DROPPED = 1) PARAMETER (FILLED = 2) PARAMETER (ROUND_NUM = 3) PARAMETER (FULL_NEEDED_NUM = 4) PARAMETER (HIGH = 5) PARAMETER (OBJ_NUM = 6) PARAMETER (HIGH_WRITE = 7) INTEGER*4 MAX_OBJECTS INTEGER*4 RIGHT,LEFT PARAMETER (RIGHT = 1) PARAMETER (LEFT = -1) INTEGER*4 KB_AST_ADDR,DROP_AST_ADDR PARAMETER MAX_TIMERS = 3 STRUCTURE /TIME_BIN/ INTEGER*4 TIME (2) END STRUCTURE RECORD /TIME_BIN/ WAIT_TIME(MAX_TIMERS) INTEGER*4 WAIT_TIME2(2) INTEGER*4 TIMER_TO_SET CHARACTER*8 TIME_CHAR(MAX_TIMERS) /'0 ::00.5','0 ::00.4','0 ::00.3'/ INTEGER*4 TIME_LEN (MAX_TIMERS) /8,8,8/ CHARACTER*1 CHAR CHARACTER*9 SCORE_CHAR,FULL_ROWS_CHAR CHARACTER*1 FLOOR(BOARD_ROWS,BOARD_COLS) INTEGER*4 CURRENT_ROW,CURRENT_COL,I,J,K,OBJECT_TYPE,R,C INTEGER*4 CURRENT_POSITION STRUCTURE /OBJECT_STRUCT/ UNION MAP CHARACTER*1 PICT(4,5,9) ENDMAP MAP BYTE PICT_BYTE(4,5,9) ENDMAP ENDUNION BYTE CURRENT_POSITION ! 1,2,3,4 INTEGER*4 OBJECT_NUM INTEGER*4 REND END STRUCTURE RECORD /OBJECT_STRUCT/ OBJECTS(20),CURRENT_OBJECT LOGICAL*1 OBJECT_DROPPING,START_NEW_OBJECT,START_NEW_TIMER LOGICAL*1 OK_DROP,OK_MOVE,OK_ROTATE,GAME_OVER,FIRST_DROP PARAMETER ROW_SHIFT = 3 PARAMETER COL_SHIFT = 5 PARAMETER OBJECT_ROWS = 5 PARAMETER OBJECT_COLS = 9 COMMON /COM/ P1,BOARD,SCORE,DISPLAY,KID,KB_AST_ADDR,DROP_AST_ADDR, * OBJECT_DROPPING,START_NEW_OBJECT,START_NEW_TIMER, * WAIT_TIME,OBJECTS,CURRENT_OBJECT,CURRENT_ROW,CURRENT_COL, * FLOOR,SCORE_BOARD,HIGHEST_ROW,FULL_ROWS,MAX_OBJECTS, * SEED,TIMER_TO_SET,WAIT_TIME2,FULL_ROWS_BOARD, * CURRENT_POSITION,GAME_OVER,STATUS_DISP,FIRST_DROP, * ROUND_DISP,FULL_NEEDED_DISP,FULL_NEEDED,ROUND, * HIGH_SCORE,HIGH_SCORE_DISP,OBJECTS_DISP,OBJ_COUNT, * CLEAR_DISP