// MONSTER.VDM -- "Monster Math", a timed math game // // Author: Abigail Mitchell, February 1997 // fixed for Vedit 6.x by Christian Ziemski 13-June-2004 // // Description: This macro is a basic math drill that covers addition, // subtraction, multiplication and division. // // Requires: VEDIT 5.0 or later. // // From OS: vedit -x monster.vdm // // From VEDIT: Select {MISC, Load/Execute macro}. Select register "100". // Enter "monster.vdm" or select via point & shoot. // // Note: MONSTER.VDM needs the file MONSTER.DAT. // // This macro could also be added to the {USER} menu. // // Resources: Various T-Regs and numeric regs are used, but they are // saved at the beginning of the macro, and restored upon exit. // // CZ begin //Reg_Pop(1,100) //Reg_Push(1,100, SET) // SET added to leave running macro untouched Reg_Push(1,99) // or leave 100 alone //Num_Pop(0,30) // CZ end Num_Push(0,30) if(FEXIST("|(USERMACRO)\MONSTER.DAT")) { RS(1,"|(USERMACRO)\MONSTER.DAT") } else { if(FEXIST("|(MACRO)\MONSTER.DAT")) { RS(1,"|(MACRO)\MONSTER.DAT") } else { if(FEXIST("MONSTER.DAT")) { RS(1,"MONSTER.DAT") } else { GK("File MONSTER.DAT not found. Press a key to exit...",STATLINE) BREAK_OUT(EXTRA) } } } #28=Buf_Num #29=Buf_Free BS(#29) Ins_File("|@(1)") BS(1) Call(#29+BUFFER) BS(#29) Buf_Quit(OK) Screen_Init() BS(#28) Reg_Pop(1,100) Num_Pop(0,30)