Home » Personal collection » Acorn hard disk » misc » misc3 » shipwren/Plop

shipwren/Plop

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » misc » misc3
Filename: shipwren/Plop
Read OK:
File size: 0715 bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM >plop
   20
   30DIM taskid%4:$taskid%="TASK"
   40SYS "Wimp_Initialise",200,!taskid%,"Test " TO version%,handle%
   50PROCvars
   60DIM q% &300,buffer% &200
   70q%!4=handle%:!q%=20:q%!12=0:q%!16=&400C3:SYS "Wimp_SendMessage",17,q%,0
   80
   90DIM DiscNameArray% 30
  100DIM NameArray% 60
  110DiscName$ = "xx"
  120
  130ON ERROR PROCfinish
  140
  150REPEAT
  160  SYS Poll%,0,q% TO A%
  170  CASE A% OF
  180    WHEN 17,18: PROCreceive(q%):REM 17 is shut me up, 18 is shut all up.
  190  ENDCASE
  200  IF times=4 THEN PROCdo_your_stuff
  210UNTIL FALSE
  220
  230DEFPROCdo_your_stuff:
  240FOR R=23 TO 127
  250VDU23,R,RND(255),RND(255),RND(255),RND(255),RND(255),RND(255),RND(255),RND(255)
  260NEXT
  270ENDPROC
  280
  290DEF PROCreceive(q%)
  300LOCAL sz%,act%
  310ON ERROR LOCAL ENDPROC
  320act% = q%!16
  330CASE act% OF
  340  WHEN 0:IF A%=18 THEN PROCfinish
  350  WHEN &400C3:
  360    IF (A%=17) AND (q%!4<>handle%) THEN
  370      REM ** Close task message **
  380      SYS "OS_ReadVarVal","Obey$Dir",NameArray%,NameArray%
  390      PROCsaveme
  400    ENDIF
  410ENDCASE
  420ENDPROC
  430
  440DEF PROCfinish
  450SYS "Wimp_CloseDown"
  460ENDPROC
  470
  480DEF PROCvars
  490Wimp    = (1<<18) + (3<<6)
  500CreateW = Wimp+1
  510OpenW   = Wimp+5
  520CloseW  = Wimp+6
  530Poll%   = Wimp+7
  540RedrawW = Wimp+8
  550UpdateW = Wimp+9
  560GetR%   = Wimp+10
  570GetW    = Wimp+11
  580GetP    = Wimp+15
  590Drag    = Wimp+16
  600CrMenu  = Wimp+20
  610DcMenu  = Wimp+21
  620times   = 0
  630ENDPROC
  640
  650DEF PROCerrorbox
  660SYS Drag,,-1
  670!buffer%=ERR:$(buffer%+4)=REPORT$+" at line "+STR$ERL+CHR$0
  680SYS "Wimp_ReportError",buffer%,1,"This task"
  690PROCfinish:END
  700ENDPROC
  710DEFPROCsaveme
  720  SYS "Hourglass_On"
  730E=OPENIN"<Obey$Dir>.Plop":IF E<>0 THEN CLOSE #E:SYS "XOS_CLI","Delete <Obey$Dir>.Plop"
  740  ONERROR LOCAL ENDPROC
  750SYS "XOS_CLI","Save <Obey$Dir>.Plop "+STR$~PAGE+" "+STR$~TOP
  760SYS "XOS_CLI","SetType <Obey$dir>.Plop Obey"
  770SYS "XOS_CLI","Access <Obey$Dir>.!Boot WR"
  780  x=OPENUP"<Obey$dir>.!boot"
  790  PTR#x=EXT#x
  800  times=times+1
  810  BPUT #x,CHR$10+"wimpslot -min 16k -max 16k"+CHR$10+"BASIC -quit <Obey$Dir>.Plop"
  820  CLOSE#x
  830  SYS "Hourglass_Off"
  840ENDPROC

� >plop

� taskid%4:$taskid%="TASK"
(@ș "Wimp_Initialise",200,!taskid%,"Test " � version%,handle%
2	�vars
<� q% &300,buffer% &200
FJq%!4=handle%:!q%=20:q%!12=0:q%!16=&400C3:ș "Wimp_SendMessage",17,q%,0
P
Z� DiscNameArray% 30
d� NameArray% 60
nDiscName$ = "xx"
x
�� � �finish
�
��
�  ș Poll%,0,q% � A%
�
  Ȏ A% �
�D    � 17,18: �receive(q%):� 17 is shut me up, 18 is shut all up.
�  �
�   � times=4 � �do_your_stuff
�� �
�
���do_your_stuff:
�� R=23 � 127
�A�23,R,�(255),�(255),�(255),�(255),�(255),�(255),�(255),�(255)
�
�

"� �receive(q%)
,� sz%,act%
6� � � �
@act% = q%!16
J
Ȏ act% �
T  � 0:� A%=18 � �finish
^  � &400C3:
h%    � (A%=17) � (q%!4<>handle%) �
r$      � ** Close task message **
|=      ș "OS_ReadVarVal","Obey$Dir",NameArray%,NameArray%
�      �saveme
�	    �
��
��
�
�
� �finish
�ș "Wimp_CloseDown"
��
�
�� �vars
�Wimp    = (1<<18) + (3<<6)
�CreateW = Wimp+1
�OpenW   = Wimp+5
CloseW  = Wimp+6
Poll%   = Wimp+7
RedrawW = Wimp+8
&UpdateW = Wimp+9
0GetR%   = Wimp+10
:GetW    = Wimp+11
DGetP    = Wimp+15
NDrag    = Wimp+16
XCrMenu  = Wimp+20
bDcMenu  = Wimp+21
ltimes   = 0
v�
�
�� �errorbox
�ș Drag,,-1
�0!buffer%=�:$(buffer%+4)=�$+" at line "+Þ+�0
�/ș "Wimp_ReportError",buffer%,1,"This task"
�
�finish:�
��
���saveme
�  ș "Hourglass_On"
�LE=�"<Obey$Dir>.Plop":� E<>0 � � #E:ș "XOS_CLI","Delete <Obey$Dir>.Plop"
�  � � �
�5ș "XOS_CLI","Save <Obey$Dir>.Plop "+�~�+" "+�~�P
�/ș "XOS_CLI","SetType <Obey$dir>.Plop Obey"
-ș "XOS_CLI","Access <Obey$Dir>.!Boot WR"
  x=�"<Obey$dir>.!boot"

  �#x=�#x
   times=times+1
*M  � #x,�10+"wimpslot -min 16k -max 16k"+�10+"BASIC -quit <Obey$Dir>.Plop"
4	  �#x
>  ș "Hourglass_Off"
H�
�
00000000  0d 00 0a 0b f4 20 3e 70  6c 6f 70 0d 00 14 04 0d  |..... >plop.....|
00000010  00 1e 1e de 20 74 61 73  6b 69 64 25 34 3a 24 74  |.... taskid%4:$t|
00000020  61 73 6b 69 64 25 3d 22  54 41 53 4b 22 0d 00 28  |askid%="TASK"..(|
00000030  40 c8 99 20 22 57 69 6d  70 5f 49 6e 69 74 69 61  |@.. "Wimp_Initia|
00000040  6c 69 73 65 22 2c 32 30  30 2c 21 74 61 73 6b 69  |lise",200,!taski|
00000050  64 25 2c 22 54 65 73 74  20 22 20 b8 20 76 65 72  |d%,"Test " . ver|
00000060  73 69 6f 6e 25 2c 68 61  6e 64 6c 65 25 0d 00 32  |sion%,handle%..2|
00000070  09 f2 76 61 72 73 0d 00  3c 1a de 20 71 25 20 26  |..vars..<.. q% &|
00000080  33 30 30 2c 62 75 66 66  65 72 25 20 26 32 30 30  |300,buffer% &200|
00000090  0d 00 46 4a 71 25 21 34  3d 68 61 6e 64 6c 65 25  |..FJq%!4=handle%|
000000a0  3a 21 71 25 3d 32 30 3a  71 25 21 31 32 3d 30 3a  |:!q%=20:q%!12=0:|
000000b0  71 25 21 31 36 3d 26 34  30 30 43 33 3a c8 99 20  |q%!16=&400C3:.. |
000000c0  22 57 69 6d 70 5f 53 65  6e 64 4d 65 73 73 61 67  |"Wimp_SendMessag|
000000d0  65 22 2c 31 37 2c 71 25  2c 30 0d 00 50 04 0d 00  |e",17,q%,0..P...|
000000e0  5a 17 de 20 44 69 73 63  4e 61 6d 65 41 72 72 61  |Z.. DiscNameArra|
000000f0  79 25 20 33 30 0d 00 64  13 de 20 4e 61 6d 65 41  |y% 30..d.. NameA|
00000100  72 72 61 79 25 20 36 30  0d 00 6e 14 44 69 73 63  |rray% 60..n.Disc|
00000110  4e 61 6d 65 24 20 3d 20  22 78 78 22 0d 00 78 04  |Name$ = "xx"..x.|
00000120  0d 00 82 0f ee 20 85 20  f2 66 69 6e 69 73 68 0d  |..... . .finish.|
00000130  00 8c 04 0d 00 96 05 f5  0d 00 a0 18 20 20 c8 99  |............  ..|
00000140  20 50 6f 6c 6c 25 2c 30  2c 71 25 20 b8 20 41 25  | Poll%,0,q% . A%|
00000150  0d 00 aa 0d 20 20 c8 8e  20 41 25 20 ca 0d 00 b4  |....  .. A% ....|
00000160  44 20 20 20 20 c9 20 31  37 2c 31 38 3a 20 f2 72  |D    . 17,18: .r|
00000170  65 63 65 69 76 65 28 71  25 29 3a f4 20 31 37 20  |eceive(q%):. 17 |
00000180  69 73 20 73 68 75 74 20  6d 65 20 75 70 2c 20 31  |is shut me up, 1|
00000190  38 20 69 73 20 73 68 75  74 20 61 6c 6c 20 75 70  |8 is shut all up|
000001a0  2e 0d 00 be 07 20 20 cb  0d 00 c8 20 20 20 e7 20  |.....  ....   . |
000001b0  74 69 6d 65 73 3d 34 20  8c 20 f2 64 6f 5f 79 6f  |times=4 . .do_yo|
000001c0  75 72 5f 73 74 75 66 66  0d 00 d2 07 fd 20 a3 0d  |ur_stuff..... ..|
000001d0  00 dc 04 0d 00 e6 14 dd  f2 64 6f 5f 79 6f 75 72  |.........do_your|
000001e0  5f 73 74 75 66 66 3a 0d  00 f0 10 e3 20 52 3d 32  |_stuff:..... R=2|
000001f0  33 20 b8 20 31 32 37 0d  00 fa 41 ef 32 33 2c 52  |3 . 127...A.23,R|
00000200  2c b3 28 32 35 35 29 2c  b3 28 32 35 35 29 2c b3  |,.(255),.(255),.|
00000210  28 32 35 35 29 2c b3 28  32 35 35 29 2c b3 28 32  |(255),.(255),.(2|
00000220  35 35 29 2c b3 28 32 35  35 29 2c b3 28 32 35 35  |55),.(255),.(255|
00000230  29 2c b3 28 32 35 35 29  0d 01 04 05 ed 0d 01 0e  |),.(255)........|
00000240  05 e1 0d 01 18 04 0d 01  22 12 dd 20 f2 72 65 63  |........".. .rec|
00000250  65 69 76 65 28 71 25 29  0d 01 2c 0e ea 20 73 7a  |eive(q%)..,.. sz|
00000260  25 2c 61 63 74 25 0d 01  36 0b ee 20 85 20 ea 20  |%,act%..6.. . . |
00000270  e1 0d 01 40 10 61 63 74  25 20 3d 20 71 25 21 31  |...@.act% = q%!1|
00000280  36 0d 01 4a 0d c8 8e 20  61 63 74 25 20 ca 0d 01  |6..J... act% ...|
00000290  54 1b 20 20 c9 20 30 3a  e7 20 41 25 3d 31 38 20  |T.  . 0:. A%=18 |
000002a0  8c 20 f2 66 69 6e 69 73  68 0d 01 5e 0f 20 20 c9  |. .finish..^.  .|
000002b0  20 26 34 30 30 43 33 3a  0d 01 68 25 20 20 20 20  | &400C3:..h%    |
000002c0  e7 20 28 41 25 3d 31 37  29 20 80 20 28 71 25 21  |. (A%=17) . (q%!|
000002d0  34 3c 3e 68 61 6e 64 6c  65 25 29 20 8c 0d 01 72  |4<>handle%) ...r|
000002e0  24 20 20 20 20 20 20 f4  20 2a 2a 20 43 6c 6f 73  |$      . ** Clos|
000002f0  65 20 74 61 73 6b 20 6d  65 73 73 61 67 65 20 2a  |e task message *|
00000300  2a 0d 01 7c 3d 20 20 20  20 20 20 c8 99 20 22 4f  |*..|=      .. "O|
00000310  53 5f 52 65 61 64 56 61  72 56 61 6c 22 2c 22 4f  |S_ReadVarVal","O|
00000320  62 65 79 24 44 69 72 22  2c 4e 61 6d 65 41 72 72  |bey$Dir",NameArr|
00000330  61 79 25 2c 4e 61 6d 65  41 72 72 61 79 25 0d 01  |ay%,NameArray%..|
00000340  86 11 20 20 20 20 20 20  f2 73 61 76 65 6d 65 0d  |..      .saveme.|
00000350  01 90 09 20 20 20 20 cd  0d 01 9a 05 cb 0d 01 a4  |...    .........|
00000360  05 e1 0d 01 ae 04 0d 01  b8 0d dd 20 f2 66 69 6e  |........... .fin|
00000370  69 73 68 0d 01 c2 17 c8  99 20 22 57 69 6d 70 5f  |ish...... "Wimp_|
00000380  43 6c 6f 73 65 44 6f 77  6e 22 0d 01 cc 05 e1 0d  |CloseDown"......|
00000390  01 d6 04 0d 01 e0 0b dd  20 f2 76 61 72 73 0d 01  |........ .vars..|
000003a0  ea 1e 57 69 6d 70 20 20  20 20 3d 20 28 31 3c 3c  |..Wimp    = (1<<|
000003b0  31 38 29 20 2b 20 28 33  3c 3c 36 29 0d 01 f4 14  |18) + (3<<6)....|
000003c0  43 72 65 61 74 65 57 20  3d 20 57 69 6d 70 2b 31  |CreateW = Wimp+1|
000003d0  0d 01 fe 14 4f 70 65 6e  57 20 20 20 3d 20 57 69  |....OpenW   = Wi|
000003e0  6d 70 2b 35 0d 02 08 14  43 6c 6f 73 65 57 20 20  |mp+5....CloseW  |
000003f0  3d 20 57 69 6d 70 2b 36  0d 02 12 14 50 6f 6c 6c  |= Wimp+6....Poll|
00000400  25 20 20 20 3d 20 57 69  6d 70 2b 37 0d 02 1c 14  |%   = Wimp+7....|
00000410  52 65 64 72 61 77 57 20  3d 20 57 69 6d 70 2b 38  |RedrawW = Wimp+8|
00000420  0d 02 26 14 55 70 64 61  74 65 57 20 3d 20 57 69  |..&.UpdateW = Wi|
00000430  6d 70 2b 39 0d 02 30 15  47 65 74 52 25 20 20 20  |mp+9..0.GetR%   |
00000440  3d 20 57 69 6d 70 2b 31  30 0d 02 3a 15 47 65 74  |= Wimp+10..:.Get|
00000450  57 20 20 20 20 3d 20 57  69 6d 70 2b 31 31 0d 02  |W    = Wimp+11..|
00000460  44 15 47 65 74 50 20 20  20 20 3d 20 57 69 6d 70  |D.GetP    = Wimp|
00000470  2b 31 35 0d 02 4e 15 44  72 61 67 20 20 20 20 3d  |+15..N.Drag    =|
00000480  20 57 69 6d 70 2b 31 36  0d 02 58 15 43 72 4d 65  | Wimp+16..X.CrMe|
00000490  6e 75 20 20 3d 20 57 69  6d 70 2b 32 30 0d 02 62  |nu  = Wimp+20..b|
000004a0  15 44 63 4d 65 6e 75 20  20 3d 20 57 69 6d 70 2b  |.DcMenu  = Wimp+|
000004b0  32 31 0d 02 6c 0f 74 69  6d 65 73 20 20 20 3d 20  |21..l.times   = |
000004c0  30 0d 02 76 05 e1 0d 02  80 04 0d 02 8a 0f dd 20  |0..v........... |
000004d0  f2 65 72 72 6f 72 62 6f  78 0d 02 94 0f c8 99 20  |.errorbox...... |
000004e0  44 72 61 67 2c 2c 2d 31  0d 02 9e 30 21 62 75 66  |Drag,,-1...0!buf|
000004f0  66 65 72 25 3d 9f 3a 24  28 62 75 66 66 65 72 25  |fer%=.:$(buffer%|
00000500  2b 34 29 3d f6 24 2b 22  20 61 74 20 6c 69 6e 65  |+4)=.$+" at line|
00000510  20 22 2b c3 9e 2b bd 30  0d 02 a8 2f c8 99 20 22  | "+..+.0.../.. "|
00000520  57 69 6d 70 5f 52 65 70  6f 72 74 45 72 72 6f 72  |Wimp_ReportError|
00000530  22 2c 62 75 66 66 65 72  25 2c 31 2c 22 54 68 69  |",buffer%,1,"Thi|
00000540  73 20 74 61 73 6b 22 0d  02 b2 0d f2 66 69 6e 69  |s task".....fini|
00000550  73 68 3a e0 0d 02 bc 05  e1 0d 02 c6 0c dd f2 73  |sh:............s|
00000560  61 76 65 6d 65 0d 02 d0  17 20 20 c8 99 20 22 48  |aveme....  .. "H|
00000570  6f 75 72 67 6c 61 73 73  5f 4f 6e 22 0d 02 da 4c  |ourglass_On"...L|
00000580  45 3d 8e 22 3c 4f 62 65  79 24 44 69 72 3e 2e 50  |E=."<Obey$Dir>.P|
00000590  6c 6f 70 22 3a e7 20 45  3c 3e 30 20 8c 20 d9 20  |lop":. E<>0 . . |
000005a0  23 45 3a c8 99 20 22 58  4f 53 5f 43 4c 49 22 2c  |#E:.. "XOS_CLI",|
000005b0  22 44 65 6c 65 74 65 20  3c 4f 62 65 79 24 44 69  |"Delete <Obey$Di|
000005c0  72 3e 2e 50 6c 6f 70 22  0d 02 e4 0c 20 20 ee 85  |r>.Plop"....  ..|
000005d0  20 ea 20 e1 0d 02 ee 35  c8 99 20 22 58 4f 53 5f  | . ....5.. "XOS_|
000005e0  43 4c 49 22 2c 22 53 61  76 65 20 3c 4f 62 65 79  |CLI","Save <Obey|
000005f0  24 44 69 72 3e 2e 50 6c  6f 70 20 22 2b c3 7e 90  |$Dir>.Plop "+.~.|
00000600  2b 22 20 22 2b c3 7e b8  50 0d 02 f8 2f c8 99 20  |+" "+.~.P.../.. |
00000610  22 58 4f 53 5f 43 4c 49  22 2c 22 53 65 74 54 79  |"XOS_CLI","SetTy|
00000620  70 65 20 3c 4f 62 65 79  24 64 69 72 3e 2e 50 6c  |pe <Obey$dir>.Pl|
00000630  6f 70 20 4f 62 65 79 22  0d 03 02 2d c8 99 20 22  |op Obey"...-.. "|
00000640  58 4f 53 5f 43 4c 49 22  2c 22 41 63 63 65 73 73  |XOS_CLI","Access|
00000650  20 3c 4f 62 65 79 24 44  69 72 3e 2e 21 42 6f 6f  | <Obey$Dir>.!Boo|
00000660  74 20 57 52 22 0d 03 0c  1b 20 20 78 3d ad 22 3c  |t WR"....  x=."<|
00000670  4f 62 65 79 24 64 69 72  3e 2e 21 62 6f 6f 74 22  |Obey$dir>.!boot"|
00000680  0d 03 16 0d 20 20 cf 23  78 3d a2 23 78 0d 03 20  |....  .#x=.#x.. |
00000690  13 20 20 74 69 6d 65 73  3d 74 69 6d 65 73 2b 31  |.  times=times+1|
000006a0  0d 03 2a 4d 20 20 d5 20  23 78 2c bd 31 30 2b 22  |..*M  . #x,.10+"|
000006b0  77 69 6d 70 73 6c 6f 74  20 2d 6d 69 6e 20 31 36  |wimpslot -min 16|
000006c0  6b 20 2d 6d 61 78 20 31  36 6b 22 2b bd 31 30 2b  |k -max 16k"+.10+|
000006d0  22 42 41 53 49 43 20 2d  71 75 69 74 20 3c 4f 62  |"BASIC -quit <Ob|
000006e0  65 79 24 44 69 72 3e 2e  50 6c 6f 70 22 0d 03 34  |ey$Dir>.Plop"..4|
000006f0  09 20 20 d9 23 78 0d 03  3e 18 20 20 c8 99 20 22  |.  .#x..>.  .. "|
00000700  48 6f 75 72 67 6c 61 73  73 5f 4f 66 66 22 0d 03  |Hourglass_Off"..|
00000710  48 05 e1 0d ff                                    |H....|
00000715