Task
Execute a system command and get its output into the program. The output may be stored in any kind of collection (array, list, etc.).




Related task
  Execute a system command


 100  HIMEM: 24576
 110  LET A = 24576
 120  LET P = 768
 130  DEF  FN P(A) =  PEEK (A) +  PEEK (A + 1) * 256
 140  DEF  FN H(A) =  INT (A / 256)
 150  DEF  FN L(A) = A -  FN H(A) * 256
 160  POKE P + 00,073: REM EOR
 170  POKE P + 01,128: REM  #$80
 180  POKE P + 02,141: REM STA
 190  POKE P + 03, FN L(A)
 200  POKE P + 04, FN H(A)
 210  POKE P + 05,073: REM EOR
 220  POKE P + 06,128: REM  #$80
 230  POKE P + 07,238: REM INC
 240  POKE P + 08, FN L(P + 3)
 250  POKE P + 09, FN H(P + 3)
 260  POKE P + 10,208: REM BNE
 270  POKE P + 11,3
 280  POKE P + 12,238: REM INC
 290  POKE P + 13, FN L(P + 4)
 300  POKE P + 14, FN H(P + 4)
 310  POKE P + 15,096: REM RTS
 320  POKE 54, FN L(P)
 330  POKE 55, FN H(P)
 340  CALL 1002
 350  PRINT  CHR$ (4)"CATALOG"
 360  PRINT  CHR$ (4)"PR#0"
 370  LET C =  - 1
 380  LET I = 0
 390  LET S = 0
 400  LET E =  FN P(P + 3)
 410  DIM S$(54)
 420  LET S$(0) = ""
 430  POKE 236, PEEK (131)
 440  POKE 237, PEEK (132)
 450  LET S =  FN P(236)
 460  FOR I = A TO E STEP 255
 470      LET C = C + 1
 480      POKE S + C * 3,255
 490      IF E - I < 255 THEN  POKE S + C * 3,E - I
 500      POKE S + C * 3 + 1, FN L(I)
 510      POKE S + C * 3 + 2, FN H(I)
 520      PRINT S$(C);
 530  NEXT 