These seem to be the standard sound frequencies, set for the high and low byte of the speaker counter:
8088, 7 for boot and 4 maybe for error (I also use 6 as it sound very similar in my machines)
386, 5 for boot
I've come to find this function for NASM:
Code:
;Inputs:
; AH -- Uniform beep value
; CX -- Low word wait counter
; DI -- High word wait counter
;
;;
OPCODE__speaker_bootbeep:
pusha
pushf
;mov ah,5
mov al,0xB6
out 43h,al
mov al,ah
out 42h,al
out 42h,al
in al,61h
or al,3
out 61h,al
.wait:
push ecx
;mov cx,0xFF
loop $
pop ecx
dec di
jnz .wait
and al,-3
out 61h,al
popf
popa
ret
Code:
;Inputs:
; AH -- Uniform beep value
; CX -- Low word wait counter
; DI -- High word wait counter
;
;;
OPCODE__speaker_bootbeep:
pushawide
pushfwide
;mov ah,5
mov al,0xB6
out 43h,al
mov al,ah
out 42h,al
out 42h,al
in al,61h
or al,3
out 61h,al
.wait:
push widecx
;mov cx,0xFF
loop $
pop widecx
dec di
jnz .wait
and al,-3
out 61h,al
popfwide
popawide
retwide
Wait 0x5FFFF in a loop for 8088 boot sound with 6:
Code:
mov widedi,0x5
mov widecx,0xFFFF
mov ah,6
call OPCODE__speaker_bootbeep
Wait 0x3FFFF in a loop for 386 boot sound with 5:
Code:
mov widedi,0x3
mov widecx,0xFFFF
mov ah,5
call OPCODE__speaker_bootbeep
Wait 0xFFFFF in a loop for 8088 slow turn on sound with 7:
Code:
mov edi,0xf
mov ecx,0xFFFF
mov ah,7
call OPCODE__speaker_bootbeep