|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
.MODEL small .STACK 100h .DATA .CODE mov ax,@data ; Initialisiert mov ds,ax ; Daten ;----- mov ah,01h ;Summand1 eingeben (Ich) int 21h sub al,30h ;ASCII->Wert (Ich) mov bl,al ;Summand1 sichern (Ich) mov ah,02h ;"+" (Ich) mov dl,"+" int 21h mov ah,01h ;Summand2 eingeben (Ich) int 21h sub al,30h ;ASCII->Wert (Ich) add bl,al ;Addition (Ich) mov ah,02h ;"=" (Ich) mov dl,"=" int 21h ;HINWEIS: Ab hier komm ich nicht mehr mit. Hier müsste mir jede Zeile ;Schritt für Schritt erklärt werden, sprich, für was ist der Befehl da, was macht ;dieser und warum an dieser Stelle usw. mov al,bl xor ah,ah aam ;BCD-Korrektur (Lehrer) mov cx,ax add cx,3030h ;Wert->ASCII (Lehrer) mov ah,02h ;Zeichenausgabe (Lehrer) mov dl,ch int 21h mov ah,02h ;Zeichenausgabe (Lehrer) mov dl,cl int 21h m1: mov ah,01h ;Warten auf Taste (Lehrer) int 16h jz M1 mov ah,02h ;LF (Lehrer) mov dl,0ah int 21h mov ah,02h ;CR (Lehrer) mov dl,0dh int 21h ;----- mov ah,4ch ; Beendet int 21h ; Programm END |

This post has been edited 5 times, last edit by "OS-EntwicklerKevin" (Jan 30th 2008, 5:27am)
Forum Software: Burning Board® 3.1.2, developed by WoltLab® GmbH