home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / ST_USER / 1990 / USERMY90.MSA / LISTINGS_ATTRIB.S < prev    next >
Text File  |  1990-03-02  |  855b  |  34 lines

  1. ***************************************
  2. *    Change a file's attributes    *
  3. ***************************************
  4.  
  5. * Print the input prompt string
  6.     PEA prompt(PC)        address of string
  7.     MOVE.W #9,-(A7)        c_conws
  8.     TRAP #1            Gem Bdos
  9.     ADDQ.L #6,A7        tidy stack up
  10.  
  11. * Input the filename of the file to alter
  12.      PEA name(PC)        stack input buffer address
  13.     MOVE.W #10,-(A7)    c_conrs
  14.     TRAP #1            Gem Bdos
  15.     ADDQ.L #6,A7        tidy stack
  16.  
  17. * Alter the attributes - hide the file
  18.     MOVE.W #2,-(A7)        hide filename
  19.     MOVE.W #1,-(A7)        set attributes
  20.     PEA name+2(PC)        stack address of name
  21.     MOVE.W #67,-(A7)    f_attrib
  22.     TRAP #1            Gem Bdos
  23.     ADDQ.L #6,A7        tidy stack up
  24.  
  25. * Finished, so return to the desktop
  26.     CLR -(A7)        p_term_old
  27.     TRAP #1            Gem Bdos
  28.  
  29.  
  30. prompt    DC.B 'Enter file to hide: ',0
  31. name    DC.B 63,0        input buffer
  32.     DS.B 64            filename stored here
  33.     EVEN
  34.