home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / ST_USER / 1990 / USERSP90.MSA / TEXT_SCREENFL.DOC < prev    next >
Text File  |  1990-07-25  |  3KB  |  58 lines

  1.                             MEMORY  MISER
  2.  
  3.  
  4. ------------------------------------------------------------------------------
  5. Screenfull is an exciting new challenge for programmers - to write a program
  6. (or even just a subroutine) that will fit on one standard monitor or TV screen.
  7. That's about 22 lines. The program can be a game, utility, graphic designer,
  8. music and MIDI editor or even a business program, the choice is yours. You can
  9. also use any programming language such as Basic, C, Pascal, STOS or 68000
  10. machine code, but remember, the whole of the source code must fit onto one
  11. screen.
  12. ------------------------------------------------------------------------------
  13.  
  14. This month's Screenfull submission is supplied by programmer Sean Cleaver of
  15. East Hoathly in Sussex. It's a password program written in 68000 assembly
  16. language using Devpac 2. Assemble it and store save it in the AUTO folder of
  17. your boot disk. When the ST is booted up the program prompts you for a password
  18. (458, but it can be changed to any numbers or digits), and won't continue
  19. unless you enter the correct one.
  20.  
  21.     The protection method is quite primitive, but the idea is sound and you
  22. could build on the idea. How about storing the directory on track 81 and then
  23. copying it to its correct place when you enter the correct password. You'd also
  24. need a protector to put it back on track 80 afterwards. Or the utility could
  25. de-scramble a file that had been encrypted for security.
  26.  
  27.  
  28. * A password program by Sean Cleaver
  29. * Written in 68000 assembly language using Devpac 2
  30. * Password = 458
  31. * Put this program first in an AUTO folder
  32.  
  33. start  PEA mess(PC)     stack address of message
  34.        MOVE #9,-(A7)     c_conws...print a string
  35.        TRAP #1          GEM BDOS
  36.        ADDQ.L #6,A7     tidy stack
  37. input  BSR key          get keypress
  38.        CMP #'4',D0     is it a '4' ?
  39.        BNE input     if not equal then branch to input
  40.        BSR key          get keypress
  41.        CMP #'5',D0     is it a '5' ?
  42.        BNE input     if not equal then branch to input
  43.        BSR key          get keypress
  44.        CMP #'8',D0     is it an '8' ?
  45.        BNE input     if not equal then branch to input
  46. exit   MOVE #$4C,-(A7)     p_term...finished!
  47.        TRAP #1          GEM BDOS
  48. key    MOVE #8,-(A7)     c_necin...get a keypress
  49.        TRAP #1          GEM BDOS
  50.        ADDQ.L #2,A7     tidy stack
  51.        RTS          return from subroutine
  52. mess  DC.B 27,69,13,10,27,89,35,40,27,112,"Enter Password: "
  53.       DC.B 27,113,27,89,37,37,"By Sean Cleaver ",189," 1990",0
  54.  
  55.  
  56.  
  57.  
  58.