home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d07xx / d0764.lha / CLI-Tools / Delay.S < prev    next >
Text File  |  1992-11-21  |  1KB  |  59 lines

  1.     incdir "ram:include/"
  2.     include exec_lib.i
  3.     include dos_lib.i
  4.  
  5. START
  6.     movea.l    a0,a2            Parameter retten
  7.     move.l    d0,d2
  8.  
  9.     lea    DOSName(pc),a1        DOS-Lib ÷ffnen
  10.     moveq    #33,d0
  11.     CALLEXEC OpenLibrary
  12.     tst.l    d0
  13.     beq.s    ende9
  14.     movea.l    d0,a6            a6: DOSBase
  15.  
  16.     cmpi.b    #'?',(a2)        '?' oder
  17.     beq.s    print_usage
  18.     cmp.b    #1,d2            kein Argument?
  19.     beq.s    print_usage        => Usage
  20.  
  21. atod:
  22.     moveq    #0,d1            Dez-String in 32-Bit-Zahl umwandeln
  23. .loop    move.b    (a2)+,d0
  24.     subi.b    #'0',d0
  25.     cmpi.b    #10,d0
  26.     bhs.s    .finish
  27.     mulu    #10,d1
  28.     add.b    d0,d1
  29.     bra.s    .loop
  30. .finish
  31.     CALLLIB    Delay
  32.  
  33. ende:
  34.     movea.l    a6,a1            DOS-Lib schlie▀en
  35.     CALLEXEC CloseLibrary
  36. ende9:    moveq    #0,d0            Ende des Progs
  37.     rts
  38.  
  39.  
  40. print_usage:                ;Usage ausgeben
  41.     CALLLIB Output
  42.     move.l    d0,d1
  43.     lea    text(pc),a0
  44.     move.l    a0,d2
  45.     moveq    #textlen,d3
  46.     CALLLIB Write
  47.     bra.s    ende
  48.  
  49.  
  50. ;*** Daten ***
  51.  
  52. DOSName: dc.b "dos.library",0
  53. ;fⁿr DOS-Befehl Version
  54.     dc.b "$VER: Delay 1.1 (27.5.92  ⌐ Thies Wellpott)",0
  55. text:    dc.b "Usage: Delay t    t in 1/50 seconds (max. 655350)", $a
  56. textlen = *-text
  57.     even
  58.  
  59.