;Plays a 1-Bit, 11kHz, Mono WAV-File over a connected earphone... ; (C) 1996 by Andreas Ess ;If you use the code, please give me an appropriate credit. ;Send a postcard saying thank you to: ; Andreas Ess ; Tufers 156 ; A-6811 Goefis ; Austria/Europe ;----------------------------------------------------------------------------- ;Converted to OS-82 Asm by Raistlin ;Converters note: This was incredibly easy to convert, ; change all the (7)'s to (0)'s :) #INCLUDE "TI-82.H" #INCLUDE "INTEL.H" .org 0 .db "PlayWave V0.1 By AE",0 Start: lea(Sound) CALL_(PlayWAV) ret PlayWAV: cli ;greylib by robert taylor can't be used :( mov a, 0C0h out (0), a mov e, (hl) inc hl mov d, (hl) inc hl mov b, 128 ;b is used as a mask SoundLoop: mov c, 20 DLoop: dec c jnz DLoop ror b jnc Play inc hl ;next byte dec de mov a, d or e jz DonePlay xor a ;exit key pressed? out (1), a in a, (1) bit 6, a jz DonePlay Play: mov a, (hl) ;get bit and b jz Play1 mov a, 0FCh out (0), a jmp SoundLoop Play1: mov a, 0C0h out (0), a jmp SoundLoop DonePlay: mov a, 0C0h out (0), a sti ret ;----------------------------------------------------------------------------- ;The WAV-File: ;----------------------------------------------------------------------------- #INCLUDE "APU.ASM" .END