Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Assembler] Assembler Sound via TSR

Empfohlene Antworten

Hiho,

ich habe ein kleines Problemchen und zwar, ich wollte den Assembler Töne später ein ganzes Lied (z.B. Alle meine Entchen), entlocken via TSR.

Mein Anfangszähler hängt irgendwo in der ASCII Tabelle rum - eigentlich sollte der mit "0" anfangen was er nicht tut. :(:(

Ich dachte mir folgendes es soll von der 2. Takt/Sekunde bis zum 5. Takt/Sekunde einen Ton ausgeben. Später wenns dieses mal funktionnieren sollte beim 7. Takt/Sekunde wieder ein Ton.

Wäre schön wenn wer bitte meinen Fehler finden würde :)

.286


model tiny

dataseg

id                      dw      'da'

alte_int_offset         dw      ?

alte_int_segment        dw      ?

INT_NR                  db      7fh

an      db      0

aus     db      0

dummy                   db      ?

codeseg

startupcode

jmp     HAUPTPROGRAMM           ;Init Hauptprogramm

;***************************************************************

ISR     proc                    ;Beginn Prozedur ISR

pusha

push   es

cmp    an,0

jnz     w1

mov   an,18d

inc     cs:[aus]

jmp    w2


w1:

dec an


w2:

mov     bx,0b800h

mov     es,bx

mov     bl,cs:[aus]

add      bl,30h

mov    es:[200],bl

cmp    cs:[aus],2


jnz M1

M:

in      al, 61h

or     al, 00000011b

out 61h,al


M1:

jmp cs:[aus],5


jnz M3


M2:

in al, 61h

and al, 11111100b

out 61h,al


M3:


pop     es

popa

iret                            ;RET nach ISR


ISR     endp                    ;Ende Prozedur ISR

;***************************************************************

HAUPTPROGRAMM:

mov     ah,35h                           

mov     al,INT_NR                      ;sichern alte ISR-Adresse

int       21h                               

cmp     es:id,'da'                         ;ISR installiert?

jz        RE_INSTALL                     ;ja,springe zum Entfernen

mov     alte_int_offset,bx             ;Speichern alte Int-Offset

mov     alte_int_segment,es          ;Speichern alte Segmentadr.

mov     dx,offset ISR                    

mov     al,INT_NR                        ;neue Adresse für INT_NR

mov     ah,25h                             

int       21h                                 

mov	  dx,offset dummy		;Endadr. merken

mov     cl,4                    ;Paragraphenanzahl ermitteln

shr     dx,cl                   ;  -"-

inc     dx                      ;  -"-

mov     ax,3100h

int     21h                     ;speicherresident machen

RE_INSTALL: 

mov     ah,25h                  

mov     al,INT_NR               

mov     ds,es:alte_int_segment 

mov     dx,es:alte_int_offset   

int       21h                     

push    es                      ;Sichern es

mov     es,es:[02ch]            ;Sp.Env.frei

mov     ah,49h                  ; da bei neuem Aufruf 

int       21h                     ; Rest des alten Prog. bleibt

pop      es                      ;es zurueck

mov     ah,49h                  ;

int        21h                     ;Speicher alt.Prog.frei

exitcode        0               ;Ende+Speicher frei

END

sry wegen der Formatierun ^^

Wenn sich wer die .ASM Downloaden möchte: https://dl.dropbox.com/u/2988174/bla.asm

Danke im Vorraus

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.