home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d941 / flipprefs.lha / FlipPrefs / fprefs.asm < prev    next >
Assembly Source File  |  1993-12-20  |  2KB  |  141 lines

  1. Print Macro
  2.  move.l d6,d1
  3.  lea \1(PC),a0
  4.  move.l a0,d2
  5.  move.l #\1E-\1,d3
  6.  move.l a5,a6
  7.  jsr -48(a6)
  8.  endm
  9.  
  10.  bra ReturnCode
  11. SomeInfos
  12.  dc.b " $VER: FPrefs1 (09.07.93) written by T. Stocksmeier ",0
  13.  even
  14. ReturnCode
  15.  clr.l d7
  16. SaveArgs
  17.  move.b #0,-1(a0,d0)
  18.  move.l a0,a3
  19.  move.l d0,d5
  20. OpenDos
  21.  lea Dos(PC),a1
  22.  clr.l d0
  23.  move.l 4.w,a6
  24.  jsr -552(a6)
  25.  tst.l d0
  26.  beq Leave
  27.  move.l d0,a5
  28. GetOutput
  29.  move.l a5,a6
  30.  jsr -60(a6)
  31.  tst.l d0
  32.  beq CloseDos
  33. Test
  34.  move.l d0,d6
  35.  subq #1,d5
  36.  tst.l d5
  37.  beq NoLine
  38. GoOn
  39.  cmp.b #"?",(a3)
  40.  beq TellInfo
  41. OpenInt
  42.  lea Int(PC),a1
  43.  clr.l d0
  44.  move.l 4.w,a6
  45.  jsr -552(a6)
  46.  tst.l d0
  47.  beq Leave
  48.  move.l d0,a4
  49. AllocBuf
  50.  move.l #250,d0
  51.  move.l #1,d1
  52.  jsr -198(a6)
  53.  tst.l d0
  54.  beq NoMem
  55.  move.l d0,d5
  56. OpenFile
  57.  move.l a3,d1
  58.  move.l #1005,d2
  59.  move.l a5,a6
  60.  jsr -30(a6)
  61.  tst.l d0
  62.  beq NotFound
  63.  move.l d0,d4
  64. ReadIn
  65.  move.l d0,d1
  66.  move.l d5,d2
  67.  move.l #234,d3
  68.  jsr -42(a6)
  69.  cmp.b #232,d0
  70.  bne NoPFile 
  71. SetPrefs
  72.  move.l a4,a6
  73.  move.l d5,a0
  74.  move.l #232,d0
  75.  clr.l d1
  76.  jsr -324(a6)
  77. CloseFile
  78.  move.l d4,d1
  79.  move.l a5,a6
  80.  jsr -36(a6) 
  81. KillBuf
  82.  move.l d5,a1
  83.  move.l #250,d0
  84.  move.l 4,a6
  85.  jsr -210(a6)
  86. CloseInt
  87.  move.l 4,a6
  88.  move.l a4,a1
  89.  jsr -414(a6)
  90. CloseDos
  91.  move.l 4,a6
  92.  move.l a5,a1
  93.  jsr -414(a6)
  94. Leave
  95.  move.l d7,d0
  96.  rts
  97.  
  98. NoPFile
  99.  Print NoP
  100.  move.l #6,d7
  101.  bra CloseFile
  102.  
  103. NotFound
  104.  Print Not
  105.  move.l #11,d7
  106.  bra KillBuf
  107.  
  108. NoMem
  109.  Print NoM
  110.  move.l #21,d7
  111.  bra CloseInt
  112.  
  113. NoLine
  114.  Print NoL
  115.  move.l #11,d7
  116.  bra CloseDos
  117.  
  118. TellInfo
  119.  Print Inf
  120.  bra CloseDos
  121.  
  122. Dos  dc.b "dos.library",0
  123. Int  dc.b "intuition.library",0
  124. NoP  dc.b "WARN: This file is not a preferences-file!",10
  125. NoPE
  126. Not  dc.b "ERROR: Cannot find that file!!",10 
  127. NotE
  128. NoM  dc.b "FAIL: Cannot allocate file buffer!!!",10
  129. NoME
  130. NoL  dc.b "ERROR: No command line given!! Type '?' as arg for more info",10
  131. NoLE
  132. Inf
  133.      dc.b 10,"      >>> FPrefs1 - FlipPrefs <<<",10
  134.      dc.b 10,"WRITTEN BY T. STOCKSMEIER IN JULY 1993 !!",10
  135.      dc.b 10,"USAGE: FPrefs1 <File>",10
  136.      dc.b 10,"(File must be a configuration-file!)",10
  137.      dc.b 10
  138.  
  139. InfE
  140.  end
  141.