diff options
author | fishsoupisgood <github@madingley.org> | 2019-05-28 12:09:03 +0100 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2019-05-28 12:09:03 +0100 |
commit | ee33718ab57c5a041b55c70c0ae7e046b3d1592b (patch) | |
tree | 118fa6880cb9f8d592516c5b40325f9b7448d0af /3ball | |
parent | 8110dec1577d9a9002119c15467d71d8a1f51bc8 (diff) | |
download | wristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.tar.gz wristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.tar.bz2 wristapps-ee33718ab57c5a041b55c70c0ae7e046b3d1592b.zip |
general tidy up add all the timex apps and the toebes apps and numpad
Diffstat (limited to '3ball')
-rw-r--r-- | 3ball/3ball.asm | 148 |
1 files changed, 0 insertions, 148 deletions
diff --git a/3ball/3ball.asm b/3ball/3ball.asm deleted file mode 100644 index 73a3be4..0000000 --- a/3ball/3ball.asm +++ /dev/null @@ -1,148 +0,0 @@ -;Name: 3BALL
-;Version: 3BALL
-;Description: An executive decision maker that will give a yes/no/maybe answer. Pressing Next will generate another answer and beep (since it will be the same answer sometimes).
-;
-;(c) 1997 Wayne Buttles (timex@fdisk.com). Compiled using tools and knowledge published by John A. Toebes, VIII and Michael Polymenakos (mpoly@panix.com).
-; Some enhancements by John Toebes...
-;
-;HelpFile: watchapp.hlp
-;HelpTopic: 100
-;
-; <A NAME="3ball_1">(1) Program specific constants</A>
-;
- INCLUDE "wristapp.i"
-;
-; Program specific constants
-;
-CURRENT_TIC EQU $27 ; Current system clock tic (Timer)
-LAST_ANS EQU $61
-RAND_SEED EQU $60
-MARQ_POS EQU $62
-START EQU *
-;
-; <A NAME="3ball_2">(2) System entry point vectors</A>
-;
-L0110: jmp MAIN ; The main entry point - <A HREF="wristappformat.html#WRIST_MAIN">WRIST_MAIN</A>
-L0113: bclr 1,BTNFLAGS ; Called when we are suspended for any reason - <A HREF="wristappformat.html#WRIST_SUSPEND">WRIST_SUSPEND</A>
- rts
-L0116: jmp FLASH ; Called to handle any timers or time events - <A HREF="wristappformat.html#WRIST_DOTIC">WRIST_DOTIC</A>
-L0119: bclr 1,BTNFLAGS ; Called when the COMM app starts and we have timers pending - <A HREF="wristappformat.html#WRIST_INCOMM">WRIST_INCOMM</A>
- rts
-L011c: rts ; Called when the COMM app loads new data - <A HREF="wristappformat.html#WRIST_NEWDATA">WRIST_NEWDATA</A>
- nop
- nop
-
-L011f: lda STATETAB,X ; The state table get routine - <A HREF="wristappformat.html#WRIST_GETSTATE">WRIST_GETSTATE</A>
- rts
-
-L0123: jmp HANDLE_STATE0
- db STATETAB-STATETAB
-;
-; <A NAME="3ball_3">(3) Program strings</A>
-;
-S6_MSG timex6 "3 BALL"
-S6_MAYBE timex6 "MAYBE"
-S6_YES timex6 " YES"
-S6_NO timex6 " NO"
-S6_MARQ timex6 " +O+ "
-
-MARQ_SEL
- DB S6_MARQ+2-START
- DB S6_MARQ+3-START
- DB S6_MARQ+2-START
- DB S6_MARQ+1-START
- DB S6_MARQ-START
- DB S6_MARQ+1-START
-
-MSG_SEL DB S6_YES-START
- DB S6_NO-START
- DB S6_MAYBE-START
- DB S6_YES-START
-;
-; <A NAME="3ball_4">(4) State Table</A>
-;
-STATETAB:
- db 0
- db EVT_ENTER,TIM2_16TIC,0 ; Initial state
- db EVT_RESUME,TIM_ONCE,0 ; Resume from a nested app
- db EVT_DNNEXT,TIM2_16TIC,0 ; Next button
- db EVT_TIMER2,TIM_ONCE,0 ; Timer
- db EVT_MODE,TIM_ONCE,$FF ; Mode button
- db EVT_END
-;
-; <A NAME="3ball_5">(5) State Table 0 Handler</A>
-; This is called to process the state events.
-; We see ENTER, RESUME, TIMER2 and NEXT events
-;
-HANDLE_STATE0:
- bset 1,APP_FLAGS ; Indicate that we can be suspended
- bclr 1,BTNFLAGS
- lda BTNSTATE
- cmp #EVT_DNNEXT ; Did they press the next button?
- beq DOITAGAIN
- cmp #EVT_ENTER ; Or did we start out
- beq DOITAGAIN
- cmp #EVT_RESUME
- beq REFRESH
-;
-; <A NAME="3ball_6">(6) Select a random answer</A>
-;
-SHOWIT
- bsr RAND
- and #3 ; go to a 1 in 4 chance
- sta LAST_ANS
-;
-; <A NAME="3ball_7">(7) Display the currently selected random number</A>
-;
-REFRESH
- ldx LAST_ANS ; Get the last answer we had, and use it as an index
- lda MSG_SEL,X ; And get the message to display
- jsr PUT6TOP ; Put that on the top
-BANNER
- lda #S6_MSG-START
- jsr PUT6MID
- lda #SYS8_MODE ; And show the mode on the bottom
- jmp PUTMSGBOT
-;
-; <A NAME="3ball_8">(8) This flashes the text on the screen</A>
-;
-FLASH
- lda CURRENT_APP ; See which app is currently running
- cmp #APP_WRIST ; Is it us?
- bne L0113 ; No, so just turn off the tic timer since we don't need it
- ldx #5
- lda MARQ_POS
- jsr INCA_WRAPX
- sta MARQ_POS
- tax
- lda MARQ_SEL,X
- jmp PUT6TOP
-;
-; <A NAME="3ball_9">(9) They want us to do it again</A>
-;
-DOITAGAIN ; Tell them we are going to do it again
- clr MARQ_POS
- bset 1,BTNFLAGS
- bra BANNER
-;
-; <A NAME="3ball_10">(10) Here is a simple random number generator</A>
-;
-RAND
- lda RAND_SEED
- ldx #85
- mul
- add #25
- sta RAND_SEED
- rola
- rola
- rola
- rts
-;
-; <A NAME="3ball_11">(11) This is the main initialization routine which is called when we first get the app into memory</A>
-;
-MAIN:
- lda #$c0 ; We want button beeps and to indicate that we have been loaded
- sta WRISTAPP_FLAGS
- lda CURRENT_TIC
- sta RAND_SEED
- rts
|