1;* ======================================================================== *; 2;* The routines and data in this file (fillzero.asm) are dedicated to the *; 3;* public domain via the Creative Commons CC0 v1.0 license by its author, *; 4;* Joseph Zbiciak. *; 5;* *; 6;* https://creativecommons.org/publicdomain/zero/1.0/ *; 7;* ======================================================================== *; 8 9;; ======================================================================== ;; 10;; FILLZERO ;; 11;; Fills memory with zeros ;; 12;; ;; 13;; FILLMEM ;; 14;; Fills memory with a constant ;; 15;; ;; 16;; INPUTS: ;; 17;; R0 -- Fill value (FILLMEM only) ;; 18;; R1 -- Number of words to fill ;; 19;; R4 -- Start of fill area ;; 20;; R5 -- Return address ;; 21;; ;; 22;; OUTPUTS: ;; 23;; R0 -- Zeroed if FILLZERO, otherwise untouched. ;; 24;; R1 -- Zeroed ;; 25;; R4 -- Points to word after fill area ;; 26;; ======================================================================== ;; 27CLRSCR PROC 28 MVII #$0F0, R1 29 MVII #$200, R4 30FILLZERO CLRR R0 ; Start out with R0 zeroed for FILLZERO 31FILLMEM MVO@ R0, R4 ; Store R0 out at R4, and move along 32 DECR R1 ; Keep going until our count runs out 33 BNEQ FILLMEM 34 JR R5 ; Return to the caller. 35 ENDP 36 37;; ======================================================================== ;; 38;; End of File: fillzero.asm ;; 39;; ======================================================================== ;; 40