ô >SourceCode ô ô Resetter module (ô Version 1.02 2ô <ô by Richard Murray Fô P:ô Downloaded from: http://www.heyrick.co.uk/assembler/ Z d: nî … ñ ö$+" at "+Ã(ž/10) : à x: ‚Þ code% 1024 Œ"ã x%=0 ¸ 1023 : code%?x%=0 : í –:  ã pass% = 4 ¸ 7 ˆ 3 ªP%=0 ´ O%=code% ¾[ OPT pass% È/ EQUD 0 ; Start-up code Ò0 EQUD initialise ; Initialisation Ü. EQUD finalise ; Finalisation æ6 EQUD 0 ; Service call handler ð. EQUD module_title ; Module title ú- EQUD module_help ; Module help A EQUD help_table ; Help and command decoding table 7 EQUD 0 ; SWI chunk base number 3 EQUD 0 ; SWI handling code "3 EQUD 0 ; SWI decoding code ,3 EQUD 0 ; SWI decoding code 6 @ .module_title J EQUS "Resetter" T EQUB 0 ^ ALIGN h r .module_help |6 EQUS "Resetter"+½(9)+"1.02 (03 Jan 1997)" † EQUB 0  ALIGN š ¤ .help_table ®7 EQUS "ResetNow" ; Keyword string ¸ EQUB 0  ALIGN Ì8 EQUD reset_code ; Pointer to code Ö> EQUD 0 ; Parameter information à8 ; (no parameters) êA EQUD reset_syntax ; Pointer to syntax string ô? EQUD reset_help ; Pointer to help string þ= EQUD 0 ; End of command table   .reset_help 7 EQUS "*ResetNow will reset your computer." & EQUB 13 0 EQUB 13 :C EQUS " ********************************************" D EQUB 13 NC EQUS " * WARNING : All unsaved work WILL be lost! *" X EQUB 13 bC EQUS " ********************************************" l EQUB 13 v EQUB 0 € EQUB 0 Š EQUB 0 ” ž .reset_syntax ¨% EQUS "Syntax: *ResetNow" ² EQUB 0 ¼ ALIGN Æ Ð .initialise Ú STMFD R13!, {R14} ä> MOV R0, #14 ; Set up event on mouse î6 ; button change ø MOV R1, #10  SWI "OS_Byte"  ; MOV R0, #&10 ; Claim event vector ! ADR R1, check_mouse   MOV R2, #&100 * SWI "OS_Claim" 4 LDMFD R13!, {PC} > H .finalise R STMFD R13!, {R14} \; MOV R0, #13 ; Remove mouse event f MOV R1, #10 p SWI "OS_Byte" z= MOV R0, #&10 ; Release event vector „! ADR R1, check_mouse Ž MOV R2, #&100 ˜ SWI "OS_Release" ¢ LDMFD R13!, {PC} ¬ ¶ .reset_code À MOV R0, #200 Ê< MOV R1, #2 ; Set to clear memory Ô MOV R2, #0 Þ SWI "OS_Byte" è6 SWI 131178 ; SWI XOS_Reset ò= SWI "OS_EnterOS" ; If not, fall back to üA MOV R0, #&03800000 ; conventional reset code.  LDR R1, [R0, #0]  STR R1, [R0, -R0]  MOV PC, #0 $ . .check_mouse 8' STMFD R13!, {R0 - R12, R14} B: CMP R0, #10 ; The right vector? L BNE exit V: CMP R3, #7 ; All keys pressed? ` BNE exit j' LDMFD R13!, {R0 - R12, R14} t B reset_code ~ ˆ .exit ’& LDMFD R13!, {R0 - R12, PC} œ ¦ .stuff_at_the_end ° EQUB 10 º EQUB 10 Ä9 EQUS "Resetter module © 1997 Richard Murray" Î EQUB 10 Ø ] â í pass% ì: ö4ÿ("Save .ResetMod "+Ã~code%+" +"+Ã~P%) (ÿ("SetType .ResetMod FFA")  : à ÿ