URL
                    https://opencores.org/ocsvn/rf6809/rf6809/trunk
                
            Subversion Repositories rf6809
[/] [rf6809/] [trunk/] [software/] [boot/] [demo.asm] - Rev 16
Compare with Previous | Blame | View Log
; ============================================================================; __; \\__/ o\ (C) 2013-2022 Robert Finch, Waterloo; \ __ / All rights reserved.; \/_// robfinch<remove>@opencores.org; ||;;; BSD 3-Clause License; Redistribution and use in source and binary forms, with or without; modification, are permitted provided that the following conditions are met:;; 1. Redistributions of source code must retain the above copyright notice, this; list of conditions and the following disclaimer.;; 2. Redistributions in binary form must reproduce the above copyright notice,; this list of conditions and the following disclaimer in the documentation; and/or other materials provided with the distribution.;; 3. Neither the name of the copyright holder nor the names of its; contributors may be used to endorse or promote products derived from; this software without specific prior written permission.;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.;; ============================================================================;OPT include "d:\cores2022\rf6809\software\boot\mon_equates.asm"OPT include "d:\cores2022\rf6809\software\boot\io_equates.asm"sprite_xpos EQU $1000sprite_ypos EQU $1020sprite_dx EQU $1040sprite_dy EQU $1080org $FF8000lbra sprite_demolbra disassem;==============================================================================; Disassembler;==============================================================================OPT include "d:\cores2022\rf6809\software\boot\disassem.asm";==============================================================================; Sprite Demo;==============================================================================sprite_demo:ldb #1tfr b,dprsetdp 1ldd #-1 ; show them alltfr d,xswifcb MF_ShowSpritesldy #0sprite_demo1:; Assign random positionsswifcb MF_Randomandb #$1FFclraaddd #200std SPRITE_CTRL+0,y ; hpostfr x,dandb #$FFclraaddd #64std SPRITE_CTRL+1,y ; vposleay 8,ycmpy #$100blo sprite_demo1; turn on sprite DMAldd #-1std SPRITE_CTRL+$3D0std SPRITE_CTRL+$3D2ldy #0sprite_demo2:swifcb MF_Randomandb #$15subb #8stb sprite_dx,yanda #15suba #8sta sprite_dx,yinycmpy #32blo sprite_demo2ldy #300000sprite_demo3:deybne sprite_demo3ldx #0ldy #0sprite_demo4:lda SPRITE_CTRL+0,xadda sprite_dx,ysta SPRITE_CTRL+0,xlda SPRITE_CTRL+1,xadda sprite_dy,ysta SPRITE_CTRL+1,xleax 8,xinycmpy #32blo sprite_demo4clraclrbswifcb MF_INCHcmpb #CTRLCbne sprite_demo3ldd #0tfr d,xswifcb MF_ShowSpritessprite_demo5:swifcb MF_Monitorbra sprite_demo5
