; This is an example of a Plug-In file that captures whatever is on the ; screen to the GRAPH screen every time [GRAPH] is pressed. Note that ; plug-ins are only called during GET_KEY loops so you can only grab images ; on the screen when the program requests a key press. ; Compile with TASM and use "MAKESN.EXE GRAB START END" #include "TI-85.H" .org 0 .db 0 ; Z-Terminated title of our program ; I didn't add a title to conserve space. ; A Plug-In file has took hook on to SuperNova so that it will be called ; during GET_KEY calls. To do this a Plug-In uses the startup and shutdown ; string characteristics to hook and unhook itself from SuperNova. LD_PLUGIN(oldhandler,customroutine) ; Load Plug-In system ret ; Return to normal operation ; This is the plug-in routine for GRAB ; This routine will be called everytime GET_KEY is called. customroutine: push hl ; Make sure to save all registers! push bc push de push af cp $2F ; [GRAPH] = Capture Screen jr nz,return ld hl,VIDEO_MEM ld de,GRAPH_MEM ld bc,1024 ldir return: pop af ; Restore all Registers! pop de pop bc pop hl oldhandler: CALL ERROR_CALL ; This is needed so that other plugins ; will be called after this one is done. ; YOU MUST put this here, otherwise other previously loaded Plug-Ins ; WILL NOT BE CALLED by SuperNova. ret ; Jump back to SN .end