.ORG $90
TOP:
LDI R0,#$01 ; value used to reset watchdog timer
STA R0,$f716 ; - Reset watchdog timer
STA R0,$f71d ; reset mystery register to $01
LDA R0,$f71d ; check mystery register
BNZ BEEP ; beep if it is not zero
JMP TOP ; else don't beep
BEEP:
LDI R4,#$04 ;duration of beep
LDI R2,#$80 ;pitch of beep
PLAY: STA R4,$f700
STA R2,$f701
LDI R0,#$01 ;beep mode instead of timer mode
STA R0,$f702
LABEL: LDA R0,$f703
BNZ LABEL ;wait for beep to complete
JMP TOP
1. Run it without batteries in your camera.
2. Run it with batteries in your camera.
3. Do 1 and then put in batteries while it is running.
4. Do 2 and then take the batteries out while it is running.
6. Try anything else you dream up to figure out what the exact purpose of this hardware register is.
7. Post your guess as to what this register is used for.
8. If you work for Pure Digital or Smal Camera Technologies or a related company or for whatever reason you KNOW what it does already, then skip 1-7 and post the authoritative answer with a spoiler notice starting your post so all those who want to post their guess before seeing the answer can do so.
Another thing you might try is changing BNZ BEEP to BRZ BEEP and notice the difference.
.ORG $90
TOP:
LDI R0,#$01 ; value used to reset watchdog timer
STA R0,$f716 ; - Reset watchdog timer
STA R0,$f71d ; reset mystery register to $01
LDA R0,$f71d ; check mystery register
BNZ BEEP ; beep if it is not zero
JMP TOP ; else don't beep
BEEP:
LDI R4,#$04 ;duration of beep
LDI R2,#$80 ;pitch of beep
PLAY: STA R4,$f700
STA R2,$f701
LDI R0,#$01 ;beep mode instead of timer mode
STA R0,$f702
LABEL: LDA R0,$f703
BNZ LABEL ;wait for beep to complete
JMP TOP
1. Run it without batteries in your camera.
2. Run it with batteries in your camera.
3. Do 1 and then put in batteries while it is running.
4. Do 2 and then take the batteries out while it is running.
6. Try anything else you dream up to figure out what the exact purpose of this hardware register is.
7. Post your guess as to what this register is used for.
8. If you work for Pure Digital or Smal Camera Technologies or a related company or for whatever reason you KNOW what it does already, then skip 1-7 and post the authoritative answer with a spoiler notice starting your post so all those who want to post their guess before seeing the answer can do so.
Another thing you might try is changing BNZ BEEP to BRZ BEEP and notice the difference.