%ô >Ssaver BudgieSoft screen saver !ô V1.01 © 1997 Richard Murray ô (%ô Assembler programming example 1 2:ô Downloaded from: http://www.heyrick.co.uk/assembler/ < F: Pî … ñ ö$+" at "+Ã(ž/10) : à Z: dÞ code% &400 nã pass% = 4 ¸ 6 ˆ 2 x P%=0 ‚ O%=code% Œ [ OPT pass% –   MOV R7, R14 ª ´ MOV R0, #&8C ¾ SWI "XOS_Find" È BVS exit Ò MOV R6, R0 Ü æ MOV R0, #2 ð MOV R1, R6 ú ADR R2, header_text  MOV R3, #26  SWI "XOS_GBPB"  BVS error " , MOV R0, #&87 6 SWI "XOS_Byte" @ MOV R0, R2 J MOV R1, R6 T BL write_byte ^ h MOV R5, #0 r .col_loop | MOV R0, R5 † MOV R1, #16  SWI "OS_ReadPalette" š MOV R1, R6 ¤* MOV R0, R2, LSR #8 ; red 1st ® BL write_byte ¸, MOV R0, R2, LSR #16 ; green 1st  BL write_byte Ì+ MOV R0, R2, LSR #24 ; blue 1st Ö BL write_byte à* MOV R0, R3, LSR #8 ; red 2nd ê BL write_byte ô, MOV R0, R3, LSR #16 ; green 2nd þ BL write_byte + MOV R0, R3, LSR #24 ; blue 2nd  BL write_byte  ADD R5, R5, #1 & CMP R5, #16 0 BLT col_loop : D ADR R0, vdu_block N ADD R1, R0, #12 X$ SWI "OS_ReadVduVariables" b LDR R2, [R1] l LDR R3, [R1, #4] v ADD R3, R3, R2 €" SWI "XOS_RemoveCursors" Š ” MOV R1, R6 ž .main_loop ¨ LDRB R0, [R2] ² BL write_byte ¼ MOV R4, #1 Æ .loop2 Ð LDRB R5, [R2, #1]! Ú ADD R4, R4, #1 ä CMP R5, R0 î BNE skip ø CMP R4, #&FF  BLT loop2  .skip  SUB R0, R4, #1   BL write_byte * CMP R2, R3 4 BLT main_loop > H MOV R0, #&20 R BL write_byte \ MOV R0, #&20 f BL write_byte p z MOV R0, #0 „ MOV R1, R6 Ž SWI "XOS_Find" ˜# SWI "XOS_RestoreCursors" ¢ ¬ .exit ¶ MOV PC, R7 À Ê .write_byte Ô SWI "XOS_BPut" Þ MOVVC PC, R14 è ò .error ü MOV R2, R0  MOV R1, R6  MOV R0, #0  SWI "XOS_Find" $# SWI "XOS_RestoreCursors" . MOV R0, R2 8 „R PC, R7, #1<<28 B L .vdu_block V EQUD 149 ` EQUD 7 j EQUD -1 t EQUD 0 ~ EQUD 0 ˆ ’ .header_text œ* EQUS "BudgieScrn (compressed 1)" ¦ EQUB 10 ° EQUB 0 º ALIGN Ä Î ] Øí â: ì4ÿ("Save .Saver "+Ã~(code%)+" "+Ã~(O%)) ö&ÿ("SetType .Saver &FFC") :  à ÿ