products/sources/formale sprachen/Fortran image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: proc.asm   Sprache: Masm

         .Model Small
         .Stack 100h
         .Data
Hallo1   DB "Hallo!",10,13,"$"    ;10,13 =an Anfang
Hallo2   DB "Tschuess!",10,13,"$" ;nächste Zeile!

         .Code
Start:   mov  ax,@data 
         mov  ds,ax               ;DS bereit

         mov  dx,OFFSET Hallo1    ;Hallo1 ausgeben..
         mov  cx,5                ;..fuenfmal
         call RepStr              ;Und los!
         mov  dx,OFFSET Hallo2    ;Hallo2 ausgeben..
         mov  cx,2                ;..zweimal
         call RepStr              ;Und los!
  
         mov  ah,4Ch
         int  21h                 ;Programm beenden

RepStr   PROC NEAR                ;Unsere Prozedur
         push ax                  ;von oben!
         push cx
         mov  ah,09h
LoopLbl:  
         int  21h
         Loop LoopLbl
         pop cx
         pop ax
         ret
RepStr   ENDP
         END Start                ;Ende.



[ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ]