Difference between revisions of "Tagalong Todd Tutorial: Part 1 - Files"

From Intellivision Wiki
Jump to: navigation, search
(Created page with "= tag0.asm = ROMW 16 ; Use 16-bit ROM ;------------------------------------------------------------------------------ ; Include ...")
 
(tag0.asm)
Line 1: Line 1:
 
= tag0.asm =
 
= tag0.asm =
 +
    ;;==========================================================================;;
 +
    ;; Joe Zbiciak's Tagalong Todd!                                            ;;
 +
    ;; Copyright 2002, Joe Zbiciak, intvnut AT gmail.com.                      ;;
 +
    ;; http://spatula-city.org/~im14u2c/intv/                                  ;;
 +
    ;;==========================================================================;;
 +
   
 +
    ;* ======================================================================== *;
 +
    ;*  TO BUILD IN BIN+CFG FORMAT:                                            *;
 +
    ;*      as1600 -o tagalong.bin -l tagalong.lst tagalong.asm                *;
 +
    ;*                                                                          *;
 +
    ;*  TO BUILD IN ROM FORMAT:                                                *;
 +
    ;*      as1600 -o tagalong.rom -l tagalong.lst tagalong.asm                *;
 +
    ;* ======================================================================== *;
 
      
 
      
 
                 ROMW    16              ; Use 16-bit ROM
 
                 ROMW    16              ; Use 16-bit ROM

Revision as of 18:52, 16 November 2011

tag0.asm

   ;;==========================================================================;;
   ;; Joe Zbiciak's Tagalong Todd!                                             ;;
   ;; Copyright 2002, Joe Zbiciak, intvnut AT gmail.com.                       ;;
   ;; http://spatula-city.org/~im14u2c/intv/                                   ;;
   ;;==========================================================================;;
   
   ;* ======================================================================== *;
   ;*  TO BUILD IN BIN+CFG FORMAT:                                             *;
   ;*      as1600 -o tagalong.bin -l tagalong.lst tagalong.asm                 *;
   ;*                                                                          *;
   ;*  TO BUILD IN ROM FORMAT:                                                 *;
   ;*      as1600 -o tagalong.rom -l tagalong.lst tagalong.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