home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / r / readdoc / !readDOC / !RunImage (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1997-07-03  |  1.3 KB  |  72 lines

  1.  >!readDOC.!RunImage
  2.   PC .DOC file reader
  3.   by C Whitworth (c) 1996
  4.  " @ ";
  5.  "OS_GetEnv" 
  6. pos-=1:
  7. a$,pos,1)=" "
  8. com$=
  9. (a$)-pos)
  10. com$,",")
  11. $high=
  12. com$,1)="h" 
  13. com$,1)="H"
  14. file$=
  15. com$,
  16. (com$)-pos)
  17.  high,file$
  18.  high 
  19.  spr$="ANSI18":
  20.  spr$="ANSI00":
  21. Lib_LoadSprs("<ReadDoc$Dir>."+spr$)
  22.  char(256)
  23.  a=0 
  24. %char(a)=
  25. Lib_GetSprAddr(
  26. (a+256))
  27. Lib_FileLen(file$)
  28.  block len
  29.  "Load "+file$+" "+
  30. ~block
  31. x=0:y=1024-36
  32. mem=block
  33. count=27
  34. in=?mem
  35. mem+=1
  36. x=0:y-=36:mem+=1
  37.  127,08:x-=16:
  38.  x<0 x=0
  39.  &1B:
  40.  ?mem<>
  41. mem+=1:
  42. :mem+=1
  43. Lib_ShowSprAddr(char(in),x,y,0)
  44. *    x+=16
  45.  x>1280 
  46.  x=0:y-=36
  47.  y<16 
  48.  0,0,1280,1024 
  49.  0,36:x=0:y=16:count+=1
  50.  count>27 
  51. :count=0
  52.  mem=block+len+1
  53. Lib_LoadSprs(file$)
  54. length=
  55. Lib_FileLen(file$)
  56.  area length+20
  57. !area=length+20
  58. area!8=16
  59. spop=&2E
  60.  spop,&100+9,area
  61.  spop,&100+10,area,file$
  62. Lib_ShowSprAddr(spr,x,y,plot)
  63.  spop,&200+34,area,spr,x,y,plot
  64. Lib_GetSprAddr(spr$)
  65.  spop,&100+24,area,spr$ 
  66.  ,,addr
  67. B    =addr
  68. Lib_FileLen(file$)
  69.  "OS_File",13,file$ 
  70.  ,,,,length
  71. =length
  72.