0
You guys, all right?
I found an old college code in Assembly, I understand it doesn’t work nowadays because the coding must have changed, is there any way to execute it? I think I programmed him around 2005 in a Pentium 4 HT Goes below
f 230 271 "Use as Teclas Q ate U, ou tambem de A ate J ou tambem de Z ate M,$"
f 272 28b "ou digite enter para sair$"
f 28c 29c "Teclado Musical$"
a100
call 305
mov ah,07 ;Ler do Teclado
int21
cmp al,71 ;Q
jnz 112
mov bl,4F
mov bh,23
jmp 200
cmp al,77 ;W
jnz 11D
mov bl,63
mov bh,1F
jmp 200
cmp al,65 ;E
jnz 128
mov bl,3F
mov bh,1C
jmp 200
cmp al,72 ;R
jnz 133
mov bl,7B
mov bh,1A
jmp 200
cmp al,74 ;T
jnz 13E
mov bl,8A
mov bh,17
jmp 200
cmp al,79 ;Y
jnz 149
mov bl,30
mov bh,15
jmp 200
cmp al,75 ;U
jnz 154
mov bl,5D
mov bh,12
jmp 200
cmp al,61 ;A
jnz 15F
mov bl,A8
mov bh,11
jmp 200
cmp al,73 ;S
jnz 16A
mov bl,B1
mov bh,0F
jmp 200
cmp al,64 ;D
jnz 175
mov bl,20
mov bh,0E
jmp 200
cmp al,66 ;F
jnz 180
mov bl,3E
mov bh,0D
jmp 200
cmp al,67 ;G
jnz 18A
mov bl,C5
mov bh,0B
jmp 200
cmp al,68 ;H
jnz 194
mov bl,98
mov bh,0A
jmp 200
cmp al,6A ;J
jnz 19E
mov bl,6A
mov bh,09
jmp 200
cmp al,7A ;Z
jnz 1a8
mov bl,D4
mov bh,08
jmp 200
cmp al,78 ;X
jnz 1b2
mov bl,D9
mov bh,07
jmp 200
cmp al,63 ;C
jnz 1bc
mov bl,10
mov bh,07
jmp 200
cmp al,76 ;V
jnz 1c6
mov bl,9F
mov bh,06
jmp 200
cmp al,62 ;B
jnz 1d0
mov bl,E3
mov bh,05
jmp 200
cmp al,6E ;N
jnz 1da
mov bl,4C
mov bh,05
jmp 200
cmp al,6D ;M
jnz 1E4
mov bl,B5
mov bh,04
jmp 200
cmp al,0d
jz 1eb
jmp 103
int 20
a200
mov al,e6 ;seta
out 43,al
mov al,bl ;Poem o bl(menos significativo) no al
out 42,al
mov al,bh ;Poem o bh(mais significativo) no al
out 42,al
in al,61 ;Seta a dispositivo de som.
or al,03 ;Liga apenas os 2 bits necessários.
out 61,al
int 1a
mov bx,dx
add bx,09
cmp bx,dx
int 1a
jnc 219
in al,61 ;Para o som
and al,Fc
out 61,al
jmp 103
a305
mov ah,02 ;pos cursor
mov dh,01
mov dl,0f
int 10
mov dx,28C ;Mensagem do enter
mov ah,09
int 21
mov ah,02 ;pos cursor
mov dh,0f
mov dl,0f
int 10
mov dx,230 ;Mensagem do enter
mov ah,09
int 21
mov ah,02 ;pos cursor
mov dh,10
mov dl,0f
int 10
mov dx,272 ;Mensagem do enter
mov ah,09
int 21
mov ah,02 ;pos cursor
mov dh,15
mov dl,0f
int 10
mov dx,29d ;Mensagem do enter
mov ah,09
int 21
ret
2ª oitava:
234F = Dó ;letra Q
1F63 = Ré ;letra w
1C3F = Mi ;letra E
1A7B = Fá ;letra R
178A = Sol ;letra T
1530 = Lá ;letra Y
12D5 = Si ;letra U
3ª oitava:
11A8 = Dó ;letra A
0FB1 = Ré ;letra S
0E20 = Mi ;letra D
0D3E = Fá ;letra F
0BC5 = Sol ;letra G
0A98 = Lá ;letra H
096A = Si ;letra J
4ª oitava:
08D4 = Dó ;letra Z
07D9 = Ré ;letra X
0710 = Mi ;letra C
069F = Fá ;letra V
05E3 = Sol ;letra B
054C = Lá ;letra N
04B5 = Si ;letra M
And why it wouldn’t work?
– Maniero
I haven’t used this for many years, can you explain to me how to do?
– Minoru
It is important [Dit] the post and put what you tried and what the problem found. If what you’re looking for is a tutorial on how to build code, it’s not exactly the scope of the site.
– Bacco
It seems that this code was written for MS-DOS or old versions of Windows, because it uses 'int 21h'. DOSBOX emulates MS-DOS very well. Maybe you can use it to compile with a program like 'yasm' and run.
– Dougvj