Difference between revisions of "Fillmem.asm"

From Intellivision Wiki
Jump to: navigation, search
(Source Code)
m (Protected "Fillmem.asm" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
 
(10 intermediate revisions by 9 users not shown)
Line 10: Line 10:
 
See source code below for calling convention.<br /><br />
 
See source code below for calling convention.<br /><br />
  
UPJTRP  <a href="http://ccvgauufzljr.com/">ccvgauufzljr</a>, [url=http://vhraanpvedur.com/]vhraanpvedur[/url], [link=http://hroeckqgwxob.com/]hroeckqgwxob[/link], http://pfkzpmyrmigd.com/
+
= Examples =
 +
 
 +
(todo... please contribute!)
  
 
= Notes =
 
= Notes =
  
6jMGis  <a href="http://wulpntojblce.com/">wulpntojblce</a>, [url=http://oacrfggfvryh.com/]oacrfggfvryh[/url], [link=http://audpiznolnsu.com/]audpiznolnsu[/link], http://tdambiojgveg.com/
+
= Source Code =
 +
 
 +
<pre>
 +
;* ======================================================================== *;
 +
;*  These routines are placed into the public domain by their author.  All  *;
 +
;*  copyright rights are hereby relinquished on the routines and data in    *;
 +
;*  this file. -- Joseph Zbiciak, 2008                                    *;
 +
;* ======================================================================== *;
 +
 
 +
;; ======================================================================== ;;
 +
;;  FILLZERO                                                                ;;
 +
;;      Fills memory with zeros                                            ;;
 +
;;                                                                          ;;
 +
;;  FILLMEM                                                                ;;
 +
;;      Fills memory with a constant                                        ;;
 +
;;                                                                          ;;
 +
;;  INPUTS:                                                                ;;
 +
;;      R0 -- Fill value (FILLMEM only)                                    ;;
 +
;;      R1 -- Number of words to fill                                      ;;
 +
;;      R4 -- Start of fill area                                            ;;
 +
;;      R5 -- Return address                                                ;;
 +
;;                                                                          ;;
 +
;;  OUTPUTS:                                                               ;;
 +
;;      R0 -- Zeroed if FILLZERO, otherwise untouched.                     ;;
 +
;;      R1 -- Zeroed                                                        ;;
 +
;;      R4 -- Points to word after fill area                                ;;
 +
;; ======================================================================== ;;
 +
CLRSCR      PROC
 +
            MVII    #$0F0,  R1
 +
            MVII    #$200,  R4
 +
FILLZERO    CLRR    R0              ; Start out with R0 zeroed for FILLZERO
 +
FILLMEM    MVO@    R0,    R4      ; Store R0 out at R4, and move along
 +
            DECR    R1              ; Keep going until our count runs out
 +
            BNEQ    FILLMEM
 +
            JR      R5              ; Return to the caller.
 +
            ENDP
 +
 
 +
;; ======================================================================== ;;
 +
;;  End of File: fillzero.asm                                              ;;
 +
;; ======================================================================== ;;
 +
</pre>

Latest revision as of 08:22, 4 December 2010


Functions Provided

Entry pointFunction providedNotes
FILLMEMFill a block of memory with a valueDestination, value and length passed in registers.
FILLZEROFill a block of memory with zerosDestination and length passed in registers. Fills with zero.
CLRSCRClear the screen.Fills BACKTAB with zeros.



See source code below for calling convention.

Examples

(todo... please contribute!)

Notes

Source Code

;* ======================================================================== *;
;*  These routines are placed into the public domain by their author.  All  *;
;*  copyright rights are hereby relinquished on the routines and data in    *;
;*  this file.  -- Joseph Zbiciak, 2008                                     *;
;* ======================================================================== *;

;; ======================================================================== ;;
;;  FILLZERO                                                                ;;
;;      Fills memory with zeros                                             ;;
;;                                                                          ;;
;;  FILLMEM                                                                 ;;
;;      Fills memory with a constant                                        ;;
;;                                                                          ;;
;;  INPUTS:                                                                 ;;
;;      R0 -- Fill value (FILLMEM only)                                     ;;
;;      R1 -- Number of words to fill                                       ;;
;;      R4 -- Start of fill area                                            ;;
;;      R5 -- Return address                                                ;;
;;                                                                          ;;
;;  OUTPUTS:                                                                ;;
;;      R0 -- Zeroed if FILLZERO, otherwise untouched.                      ;;
;;      R1 -- Zeroed                                                        ;;
;;      R4 -- Points to word after fill area                                ;;
;; ======================================================================== ;;
CLRSCR      PROC
            MVII    #$0F0,  R1
            MVII    #$200,  R4
FILLZERO    CLRR    R0              ; Start out with R0 zeroed for FILLZERO
FILLMEM     MVO@    R0,     R4      ; Store R0 out at R4, and move along
            DECR    R1              ; Keep going until our count runs out
            BNEQ    FILLMEM
            JR      R5              ; Return to the caller.
            ENDP

;; ======================================================================== ;;
;;  End of File:  fillzero.asm                                              ;;
;; ======================================================================== ;;