home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug013.arc
/
SOUND.PRO
< prev
next >
Wrap
Text File
|
1979-12-31
|
2KB
|
45 lines
procedure SOUND;
{ Procedure developed in Turbo Pascal for the
MicroBee by Bob Burt
Use in conjunction with procedure PLAY.PRO
to produce selected notes from the normal
scale (simulation of PLAY command in
MicroWorld BASIC
Note - It is not necessary to include the
comments, which represent the assembly
language instructions from which the
inline code was derived
The inline code may be compacted, as
has been done for the procedure
LORES.PRO, for example }
begin
inline (245/213/229/ { START: PUSH AF,DE,HL }
237/91/*+34/ { LD DE,(CYCLES) }
62/184/ { LD A,0B8H }
211/2/ { OUT (2),A }
205/*+18/ { CALL PAUSE }
62/248/ { LD A,0F8H }
211/2/ { OUT (2),A }
205/*+11/ { CALL PAUSE }
27/ { DEC DE }
122/ { LD A,D }
179/ { OR E }
32/237/ { JR NZ,LOOP1 }
225/209/241/ { POP HL,DE,AF }
201/ { RET }
42/*+10/ { PAUSE: LD HL,(DELAY) }
43/ { LOOP2: DEC HL }
124/ { LD A,H }
181/ { OR L }
32/251/ { JR NZ,LOOP2 }
201/ { RET }
159/1/ { CYCLES: DS 2 }
18/0); { DELAY: DS 2 }
end; {procedure sound}