home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / demon / amstrad / clock.arc / ICLOCK.BAS < prev    next >
Encoding:
BASIC Source File  |  1993-05-20  |  1.4 KB  |  38 lines

  1. 10 OPTION RUN
  2. 20 ON ERROR GOTO 360
  3. 30 RESET
  4. 40 PRINT:PRINT "CLOCK installer - v1.00"
  5. 50 PRINT:PRINT"Which drive is CLOCK.COM on?";
  6. 60 i$=UPPER$(INPUT$(1))
  7. 70 IF INSTR("ABCDEFGHIJKLMNOP",i$) THEN 80 ELSE 60
  8. 80 PRINT i$;":"
  9. 90 LET f$=FIND$(i$+":CLOCK.COM")
  10. 100 IF f$="" THEN 330
  11. 110 IF MID$(f$,10,1)<>STRIP$(MID$(f$,10,1)) THEN 350
  12. 120 OPEN "r",1,i$+":CLOCK.COM",1
  13. 130 FIELD #1,1 AS clrec$
  14. 140 LET scb=256*PEEK(2)-100
  15. 150 LET userf=256*PEEK(2)+90
  16. 160 LET time=scb+88
  17. 170 LET lowtime=256*(time/256-INT(time/256))
  18. 180 LET hitime=INT(time/256)
  19. 190 LET lowuserf=256*(userf/256-INT(userf/256))
  20. 200 LET hiuserf=INT(userf/256)
  21. 210 LSET clrec$=CHR$(lowtime)
  22. 220 PUT #1,529
  23. 230 LSET clrec$=CHR$(hitime)
  24. 240 PUT #1,530
  25. 250 LSET clrec$=CHR$(lowuserf)
  26. 260 PUT #1,511
  27. 270 PUT #1,594
  28. 280 LSET clrec$=CHR$(hiuserf)
  29. 290 PUT #1,512
  30. 300 PUT #1,595
  31. 310 CLOSE #1
  32. 320 PRINT:PRINT"OK. Please remember to reinstall this program if you ever change the PCW and/or version ofCP/M that you are using.":SYSTEM
  33. 330 PRINT"File not found - Restart or End?"
  34. 340 k$=UPPER$(INPUT$(1)):k=INSTR("RE",k$):IF k=2 THEN SYSTEM ELSE ON k+1 GOTO 330,20
  35. 350 PRINT"File is protected - Restart or End?":GOTO 340
  36. 360 PRINT"Error no.";ERR;" reported in line";ERL;"- Restart or End?":RESUME 340
  37. ile is protected - Restart or End?":GOTO 340
  38. 360 PRINT"Error no.";ERR;" reported in line";ERL;"- Restart or End?":RESUME 340
  39.