Re: A83: Re: Help!!!
[Prev][Next][Index][Thread]
Re: A83: Re: Help!!!
Actually, I made my own which inpputs frequency and durration. It's
pretty cool. Check out the code! Also, RedPicasso used input #1 instead
of #2 so he's inputting a string. Instead of keyboard input, mine uses
arrows plus has a feature to junp the numbers by 10.
<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>
See ya,
Mastermind
http://www.bigfoot.com/~mastermind5
.NOLIST
#include "master_m.inc"
.LIST
.org $9327
ccf
jr z,Start
.dw libs-$9327
.dw Description
Start:
ld a,1
ld (coarse),a
call _homeup
ld hl,Title
set 3,(iy+5)
call _puts
res 3,(iy+5)
ld hl,8*256+23
ld (PENCOL),hl
ld hl,Author
call _vputs
ld hl,Instruct1
ld de,31*256+1
ld (PENCOL),de
call _vputs
ld de,38*256+1
ld (PENCOL),de
call _vputs
ld de,45*256+1
ld (PENCOL),de
call _vputs
ld de,52*256+1
ld (PENCOL),de
call _vputs
ld de,58*256+1
ld (PENCOL),de
call _vputs
ld hl,$0303
ld (CURROW),hl
ld hl,CoarseStr
call _puts
call _puts
ld bc,83
ld de,96*256+83
ld h,b
inc h
call _iline
ld bc,59
ld de,96*256+59
ld h,b
inc h
call _iline
Loop:
ld hl,$0302
ld (CURROW),hl
ld a,(Freq)
ld l,a
ld h,0
call _disphl
ld hl,$0B02
ld (CURROW),hl
ld a,(Durr)
ld l,a
ld h,0
call _disphl
ld hl,$0002
ld (CURROW),hl
ld hl,Pitch
call _puts
ld hl,$0902
ld (CURROW),hl
ld hl,Length
call _puts
Getkey:
call GET_KEY
cp K_CLEAR
ret z
cp K_UP
jr z,Durr_Up
cp K_DOWN
jr z,Durr_Down
cp K_RIGHT
jr z,Pitch_Up
cp K_LEFT
jr z,Pitch_Down
cp K_2ND
call z,Play
cp K_ALPHA
jr nz,Getkey
ld a,(Coarse)
xor 11
ld (Coarse),a
ld hl,$0A03
ld (CURROW),hl
dec a
jr z,CoarseOff
ld hl,On
call _puts
jr Getkey
CoarseOff:
ld hl,Off
call _puts
jr Getkey
Durr_Up:
ld hl,Durr
ld a,(Coarse)
jr Change
Durr_Down:
ld hl,Durr
ld a,(Coarse)
neg
jr Change
Pitch_Up:
ld hl,Freq
ld a,(Coarse)
jr Change
Pitch_Down
ld hl,Freq
ld a,(Coarse)
neg
jr Change
Change:
ld b,a
ld a,(hl)
add a,b
ld (hl),a
jp Loop
Play:
ld bc,(FreqDurr)
jp vector0
Description:
.db "Beep Test by Mastermind",0
Title:
.db "Calc Beep Tester",0
Author:
.db "by Mastermind",0
Instruct1:
.db "Press 2nd to play sound",0
Instruct2:
.db "Press ",60,'-',62,"to adjust pitch",0
Instruct3:
.db "Press ",30,'/',31," to adjust length",0
Instruct4:
.db "Press Alpha to switch on/off",0
Instruct5:
.db "coarse adjust",0
CoarseStr:
.db "Coarse:",0
Off
.db "Off",0
On:
.db "On ",0
Pitch:
.db "Ptch:",0
Length:
.db "Len:",0
FreqDurr:
Freq:
.db $80
Durr: ;Frequency/Durration
.db $FF
Coarse:
.db 1
Libs:
.db "ZLIB",0,0,0,0,lib0,vec0,$ff
.end
On Tue, 8 Dec 1998 21:54:21 +0900 "James Matthews"
<matthews@tkb.att.ne.jp> writes:
>
>Perhaps because curcol, currow haven't been initialized in your
>notint
>function...
>
>ld de,op1
>ld a,(de)
>ld b,a
>
>could be written:
>call _convop1
>ld a,e ; perhaps you can do ld b,e directly.
>ld b,a
>
>Oh that's cool, makes a pulse out of given information, cool
>idea...tell me
>if you get it to work, sounds interesting! HTH,
>
>James.
>==========================================
>E-mail matthews@tkb.att.ne.jp ICQ: 7413754
>http://home.att.ne.jp/gold/tomcat21/index.html
>http://hyperion.advanced.org/18242/
>==========================================
>-----Original Message-----
>From: RedPicasso@aol.com <RedPicasso@aol.com>
>To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
>Date: Tuesday, December 08, 1998 7:50 PM
>Subject: A83: Help!!!
>
>
>>
>>could anyone tell me why this code will freeze up after you input
>the
>>frequency?
>>
>>.nolist
>>#include "ti83asm.inc"
>>#include "tokens.inc"
>>#include "sos.inc"
>>
>>.org 9327h
>>.list
>>
>> xor a
>> jr initialize
>> .dw 0
>> .dw description
>>
>>description:
>> .db "Frequency",0
>>
>>initialize:
>> call _runindicoff
>> call _clrLCDfull
>> ld hl,input_cycles
>> call _puts
>> ld a,1
>> ld (ASM_IND_CALL),a
>> call $50B2 ;PGMIO_EXEC
>> call _ckint
>> jr nz,notint
>> ld de,op1
>> ld a,(de)
>> ld b,a
>> ld hl,input_frequency
>> call _puts
>> call _newline
>> ld a,1
>> ld (ASM_IND_CALL),a
>> call $50B2 ;same as above
>> call _ckint
>> jr nz,notint
>> ld de,op1
>> ld a,(de)
>> ld c,a
>>
>>beep: di ;joe's beep routine
>> ld e,$D0
>>beepl1: ld a,c
>>beepl2: dec a
>> jr nz,beepl2
>> ld a,e
>> xor %00000011
>> ld e,a
>> out (0),a
>> djnz beepl1
>> ei
>> ret
>>
>>notint:
>> ld hl,not_an_integer
>> call _puts
>> call _getkey ;I would like to change these to jp _getkey
>> ret ;but when I do it resets my mem. why?
>>
>>input_cycles:
>> .db "How many cycles?",0
>>input_frequency:
>> .db "Frequency?",0
>>not_an_integer:
>> .db "Not an integer!",0
>>.end
>>END
>>
>
>
___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]