.model small
.stack
.286

sseg SEGMENT STACK
DB 15 DUP ("STACK---")
SSEG ENDS
DSEG SEGMENT
LYRICS  DB"",0dh,0ah
        DB"",0dh,0ah
        DB"",0dh,0ah
        DB"",0dh,0ah
        DB" ALPHABET SONG",0dh,0ah
        DB"by: Erick Guevarra",0dh,0ah
        DB"",0dh,0ah
        DB"A B C D",0dh,0ah
        DB"E F G H",0dh,0ah
        DB"I J K L",0dh,0ah
        DB"M N O P",0dh,0ah
        DB"Q R S T",0dh,0ah
        DB"U AND V W X",0dh,0ah
        DB"Y AND Z",0dh,0DH, 0AH
        DB"NOW I KNOW MY ABC",0dh,0ah
        DB"SO LETS COME AND SING WITH ME",0dh,0ah
        DB"",0dh,0ah
        DB"",0dh,0ah
        DB"",0dh,0ah
WORDS EQU $ - LYRICS
DSEG ENDS
CSEG SEGMENT 'CODE'
        ASSUME CS:CSEG, SS:SSEG, DS:DSEG

MAIN PROC FAR
PUSH DS
MOV AX,DSEG
MOV DS,AX
MOV BX,001H
LEA DX,LYRICS
MOV CX,WORDS
MOV AH,40H
INT 21H

MOV AX,262
MOV BX,3000
CALL NOTE

MOV AX,262
MOV BX,3000
CALL NOTE

MOV AX,392
MOV BX,3000
CALL NOTE

MOV AX,392
MOV BX,3000
CALL NOTE

MOV AX,440
MOV BX,3000
CALL NOTE

MOV AX,440
MOV BX,3000
CALL NOTE

MOV AX,392
MOV BX,7000
CALL NOTE

MOV AX,349
MOV BX,3000
CALL NOTE

MOV AX,349
MOV BX,3000
CALL NOTE

MOV AX,330
MOV BX,3000
CALL NOTE

MOV AX,330
MOV BX,3000
CALL NOTE

MOV AX,294
MOV BX,3000
CALL NOTE

MOV AX,294
MOV BX,3000
CALL NOTE

MOV AX,262
MOV BX,7000
CALL NOTE

MOV AX,392
MOV BX,3000
CALL NOTE

MOV AX,392
MOV BX,3000
CALL NOTE

MOV AX,349
MOV BX,3000
CALL NOTE

MOV AX,349
MOV BX,3000
CALL NOTE

MOV AX,330
MOV BX,3000
CALL NOTE

MOV AX,330
MOV BX,3000
CALL NOTE

MOV AX,294
MOV BX,7000
CALL NOTE

MOV AX,392
MOV BX,3000
CALL NOTE

MOV AX,392
MOV BX,3000
CALL NOTE

MOV AX,349
MOV BX,3000
CALL NOTE

MOV AX,349
MOV BX,3000
CALL NOTE

MOV AX,330
MOV BX,3000
CALL NOTE

MOV AX,330
MOV BX,3000
CALL NOTE

MOV AX,294
MOV BX,7000
CALL NOTE

MOV AX,262
MOV BX,3000
CALL NOTE

MOV AX,262
MOV BX,3000
CALL NOTE

MOV AX,392
MOV BX,3000
CALL NOTE

MOV AX,392
MOV BX,3000
CALL NOTE

MOV AX,440
MOV BX,3000
CALL NOTE

MOV AX,440
MOV BX,3000
CALL NOTE

MOV AX,392
MOV BX,7000
CALL NOTE

MOV AX,349
MOV BX,3000
CALL NOTE

MOV AX,349
MOV BX,3000
CALL NOTE

MOV AX,330
MOV BX,3000
CALL NOTE

MOV AX,330
MOV BX,3000
CALL NOTE

MOV AX,294
MOV BX,3000
CALL NOTE

MOV AX,294
MOV BX,3000
CALL NOTE

MOV AX,262
MOV BX,7000
CALL NOTE


MOV AH,4CH
INT 21H

RET

MAIN ENDP
NOTE PROC
PUSHA
MOV CX,AX
MOV AL,0B6H
OUT 43H,AL
MOV DX,0012H
MOV AX,34DCH
DIV CX
OUT 42H,AL
JMP SHORT $+2
MOV AL,AH
OUT 42H,AL
IN AL,61H
MOV AH,AL
OR AL,03H
OUT 61H,AL
L1:MOV AL,AH
L2:LOOP L2
DEC BX
JNZ L1
MOV AL,AH
OUT 61H,AL
POPA
RET
NOTE ENDP
CSEG ENDS
END MAIN




about this part
MOV AX,349
MOV BX,3000
CALL NOTE

whats the use of each...
and btw ... its for the tones...
how can i make it slower, higher, longer?

thanks in advance...sorry about asking the codes...
:)
hope im still welcome here
Posted on 2011-09-02 10:21:06 by drow05ranger
My guess is that AX is the frequency in Hz of the note (I see 440 a few times, which is the frequency of A), and BX is the duration (in something smaller than ms...).
Posted on 2011-09-02 10:46:40 by Scali
i think i saw it...
AX is the pitch(highness/lowness)
BX is the duration of how long it will take...

thanks for those who reply. :)
going to make canon rock :)
Posted on 2011-09-02 11:22:16 by drow05ranger