Tagalong Todd Tutorial: Part 1 - Files

From Intellivision Wiki
Revision as of 18:51, 16 November 2011 by Rickreynolds (talk | contribs) (Created page with "= tag0.asm = ROMW 16 ; Use 16-bit ROM ;------------------------------------------------------------------------------ ; Include ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

tag0.asm

               ROMW    16              ; Use 16-bit ROM
   
   ;------------------------------------------------------------------------------
   ; Include system information
   ;------------------------------------------------------------------------------
               INCLUDE "gimini.asm"
   
   ;------------------------------------------------------------------------------
   ; EXEC-friendly ROM header.
   ;------------------------------------------------------------------------------
               ORG     $5000           ; Use default memory map
   ROMHDR:     BIDECLE ZERO            ; MOB picture base   (points to NULL list)
               BIDECLE ZERO            ; Process table      (points to NULL list)
               BIDECLE MAIN            ; Program start address
               BIDECLE ZERO            ; Bkgnd picture base (points to NULL list)
               BIDECLE ONES            ; GRAM pictures      (points to NULL list)
               BIDECLE TITLE           ; Cartridge title/date
               DECLE   $03C0           ; No ECS title, run code after title,
                                       ; ... no clicks
   ZERO:       DECLE   $0000           ; Screen border control
               DECLE   $0000           ; 0 = color stack, 1 = f/b mode
   ONES:       DECLE   C_BLU, C_BLU    ; Initial color stack 0 and 1: Blue
               DECLE   C_BLU, C_BLU    ; Initial color stack 2 and 3: Blue
               DECLE   C_BLU           ; Initial border color: Blue
   ;------------------------------------------------------------------------------
   
   
   ;; ======================================================================== ;;
   ;;  TITLE  -- Display our modified title screen & copyright date.           ;;
   ;; ======================================================================== ;;
   TITLE:      PROC
               STRING  102, "Tagalong Todd", 0
               BEGIN
             
               ; Patch the title string to say '=JRMZ=' instead of Mattel.
               CALL    PRINT.FLS       ; Write string (ptr in R5)
               DECLE   C_WHT, $23D     ; White, Point to 'Mattel' in top-left
               STRING  '=JRMZ='        ; Guess who?  :-)
               STRING  ' Productions' 
               BYTE    0
             
               CALL    PRINT.FLS       ; Write string (ptr in R1)
               DECLE   C_WHT, $2D0     ; White, Point to 'Mattel' in lower-right
               STRING  '2002 =JRMZ='   ; Guess who?  :-)
               BYTE    0
             
               ; Done.
               RETURN                  ; Return to EXEC for title screen display
               ENDP
   
   
   ;; ======================================================================== ;;
   ;;  MAIN:  Here's our main program code.                                    ;;
   ;; ======================================================================== ;;
   MAIN:       PROC
               BEGIN
   
               CALL    CLRSCR          ; Clear the screen
   
               RETURN                  ; Return to the EXEC and sit doing nothing.
               ENDP
   
   ;; ======================================================================== ;;
   ;;  LIBRARY INCLUDES                                                        ;;
   ;; ======================================================================== ;;
               INCLUDE "print.asm"       ; PRINT.xxx routines
               INCLUDE "fillmem.asm"     ; CLRSCR/FILLZERO/FILLMEM