⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sokoban.asm

📁 辞典 dict3.asm.grammar.asm,newword.asm 学习 learn.asm 名片 userinf.asm 备忘 userinf.asm 提醒 userinf
💻 ASM
字号:
; ***************************************************************************
; *     Project : Electronic Dictionary                                     *
; *        Date : 2003.9                                                    *
; *   File Name : SOKOBAN.ASM                                               *
; ***************************************************************************

                chip    W65C02S                 ;; Define chip : ST2100 base on 65c02.
                pw      128                     ;; .LST's page width = 128 characters.
                case    off                     ;; Don't care Upper-case or lower-case.
                externs on                      ;; Make all labels public.
                include st2202.def              ;; Include ST2100 I/O define.
                include DATA.def                ;;         Data RAM define.
                include KEYDEF.def              ;;         Key define.
                include GRAPH.def               ;;         Graphic define.
                include BIOS.h                  ;;         BIOS's head.
                include GRAPHICS.h              ;;         GRAPHICS's head.

;;[D]---------------[D]
;;   Constant define
;;[D]---------------[D]
UpDownChar      equ     16h                     ;; 《】 character.
SpaceChar       equ     20h                     ;; ' ' character.

;;[D]------------------------------------------[D]
;;   Data RAM define : CData+offset.(zero page)
;;             0 ~ 4 : For "GAME" mode.
;;[D]------------------------------------------[D]
TempReg         equ     CData+5                 ;; Temporary register.
BarrierReg      equ     CData+6                 ;; Barrier register.
OperateReg      equ     CData+7                 ;; Operate register.
StepH           equ     CData+8                 ;; High byte of step.
StepM           equ     CData+9                 ;; Middle byte of step.
StepL           equ     CData+10                ;; Low byte of step.
WorkerLocation  equ     CData+11                ;; Worker location register.
WorkerDirection equ     CData+12                ;; Worker direction register.
NewLocation1    equ     CData+13        ;; New worker location register.
NewLocation2    equ     CData+14        ;; New goods location register.
;;
;;    SoKoBanFlag
;; +-+-+-+-+-+-+-+-+
;; |7|6|5|4|3|2|1|0|
;; +++++++++++++++++
;;  | | | | | | | |
;;  7 6 5 4 3 2 | 0--- SoKoBan start/stop flag. -> 0 : SoKoBan stop.
;;              |                                  1 : SoKoBan start.
;;              1------- SoKoBan complete flag. -> 0 : Not complete yet.
;;                                                 1 : SoKoBan complete.
SoKoBanFlag     equ     CData+15                ;; SoKoBan flags.

;;[D]------------------------------[D]
;;   Data RAM define : PData+offset
;;[D]------------------------------[D]
;; Locate0000 +-+-+-+-+-+-+-+-+-+-+-+-+ Locate1100
;;            +-+-+-+-+-+-+-+-+-+-+-+-+
;;            +-+-+-+-+-+-+-+-+-+-+-+-+
;;            +-+-+-+-+-+-+-+-+-+-+-+-+
;;            +-+-+-+-+-+-+-+-+-+-+-+-+
;;            +-+-+-+-+-+-+-+-+-+-+-+-+
;;            +-+-+-+-+-+-+-+-+-+-+-+-+
;;            +-+-+-+-+-+-+-+-+-+-+-+-+
;; Locate0007 +-+-+-+-+-+-+-+-+-+-+-+-+ Locate1107
;;    Locate xxxx
;; +-+-+-+-+-+-+-+-+
;; |7|6|5|4|3|2|1|0|
;; +++++++++++++++++
;;  | | | x x x x x
;;  | | |
;;  | | 5--------------- Goods flag.
;;  | 6----------------- Target flag.
;;  7------------------- Wall flag.
Locate0000      equ     PData+0                 ;; SOKOZone buffer 12 x 8 = 96 bytes.

;;=================================================================================
DS0             .SECTION                        ;; Data ROM location 10000h(Bank#2)
;;=================================================================================
;;[T]-----------------------------[T]
;;   SOKOBAN 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -