home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 487.lha / SetSpeed_v1.0 / SetSpeed.S < prev    next >
Encoding:
Text File  |  1991-03-11  |  1.0 KB  |  62 lines

  1. *** INCLUDES ***
  2.  
  3.         incdir    include:
  4.  
  5.         include    exec/exec_lib.i
  6.         include    libraries/dos_lib.i
  7.  
  8. *** CODE ***
  9.         move.b    (a0),CmdLineChar    
  10.  
  11.         lea    DOSName,a1
  12.         clr.l    d0
  13.         CALLEXEC OpenLibrary
  14.         tst.l    d0
  15.         beq    NoDOSLib
  16.         move.l    d0,_DOSBase
  17.  
  18.         move.b    CmdLineChar,d0
  19.  
  20.         cmp.b    #"f",d0
  21.         beq    Mode60Hz
  22.         cmp.b    #"F",d0
  23.         beq    Mode60Hz
  24.         cmp.b    #"s",d0
  25.         beq    Mode50Hz
  26.         cmp.b    #"S",d0
  27.         beq    Mode50Hz
  28.  
  29.         CALLDOS Output
  30.         move.l    d0,d1
  31.         move.l    #ErrorText,d2
  32.         move.l    #ErrorTextLength,d3
  33.         CALLDOS Write
  34.         bra    CloseUp
  35.  
  36. Mode50Hz    move.w    #$20,$dff1dc
  37.         bra    CloseUp
  38.  
  39. Mode60Hz    move.w    #$00,$dff1dc
  40.  
  41. CloseUp        move.l    _DOSBase,a1
  42.         CALLEXEC CloseLibrary
  43. NoDOSLib    rts
  44.  
  45. *** DATA ***
  46.  
  47. DOSName        dc.b    "dos.library",0
  48.         even
  49. _DOSBase    dc.l    0
  50.  
  51. CmdLineChar    dc.b    0
  52.         even
  53.  
  54. ErrorText    dc.b    "SetSpeed v1.0   (c) 1990 Chris Simpson",10,13,10,13
  55.         dc.b    "USAGE: SetSpeed x where x = S or s for 50Hz mode",13,10
  56.         dc.b    "                        x = F or f for 60Hz mode",13,10,13,10
  57.         dc.b    "Note that your Amiga must have a Fatter Agnus for this program to work!",13,10,13,10
  58. ErrorTextLength    equ    *-ErrorText
  59.         even
  60.  
  61.  
  62.