; SOUND.ASM, by Tim Gerla timg@means.net 03/21/97 ;******************************************************* ;-> Thanks to Markus Klisics for first discovering the ;-> way to make sound on the 92! ;-> without him this wouldn't be here. :) @program prog_code,prog_name ;************* Start of Fargo program **************** prog_code: jsr flib[clr_scr] jsr romlib[reset_link] move.l freq,d6 move.l dur,d7 bsr sound end: jsr romlib[reset_link] rts ; No stereo yet. Coming soon. ; d6=frequency, > is lower ; d7=duration, < is faster sound: move.w #$2700,sr ;disable interrupts for ;smoother sound move.b #00,($60000e) ;turn off red & white wires or.w #$0c00,($60000e) ;turn them on move.l d6,-(a7) ;save freq soundloop: dbf.w d6,soundloop ;wait move.l (a7)+,d6 ;restore freq dbf.w d7,sound ;branch back move.w #$2000,sr ;enable interrupts rts ;return ;*********************** Data ************************ dur dc.l $40 freq dc.l $2B0 prog_name dc.b "Sound example program",0 ;*************** End of Fargo program **************** reloc_open add_library flib add_library romlib reloc_close end