ad3 INCLUDE KEYB.MAC INCLUDE SCREEN.MAC CSEG SEGMENT ASSUME CS:CSEG,DS:CSEG ORG 100h start: jmp begin stackspace db 32 dup ('STACK ') newstack dw 0 cmf_off dw ? cmf_seg dw ? fm_status db 0 instr_table: db 21h,11h,036h,00h,0fah,0f2h,63h,0f2h, 00h,00h,04h,00h,00h,00h,00h,00h ;========================================================================== wr_fmchip PROC NEAR push ax mov al,ah mov dx,388h out dx,al mov cx,0ffh lp1: loop lp1 pop ax mov dx,389h out dx,al mov cx,800h lp2: loop lp2 ret wr_fmchip ENDP ;========================================================================= fm_play PROC NEAR mov si,OFFSET instr_table mov ah,01h ;Init mov al,00h call wr_fmchip lodsb mov ah,20h ;AM/VIB/EG/KSR/MULTIPLE call wr_fmchip lodsb mov ah,23h call wr_fmchip lodsb mov ah,40h ;KSL/TOTAL LEVEL call wr_fmchip lodsb mov ah,43h ; -:- for carrier call wr_fmchip lodsb mov ah,60h ;ATTACK/DECAY RATE call wr_fmchip lodsb mov ah,63h call wr_fmchip lodsb mov ah,80h ;SUSTAIN LEVEL/RELEASE RATE call wr_fmchip lodsb mov ah,83h call wr_fmchip lodsb mov ah,0e0h ;WAVE SELECT call wr_fmchip lodsb mov ah,0e3h call wr_fmchip lodsb mov ah,0c0h ;FEEDBACK/CONNECTION call wr_fmchip ;-------------------------------------------------------------------- mov ah,08h ;CSM Mode/Keyboard split mov al,0 call wr_fmchip mov ah,0a0h ;F-NUMBER mov al,41h call wr_fmchip mov ah,0b0h ;BLOCK/F-NUMBER/KEY-ON mov al,2Ah call wr_fmchip mov ah,00h int 16h mov ah,0b0h ;BLOCK/F-NUMBER/KEY-ON mov al,00h call wr_fmchip ret fm_play ENDP ;-------------------------------------------------------------------- begin: ; call buf_init ; call read_cmf ; jc not_found call fm_play not_found: ret CSEG ENDS END Start . 0