script

=Hercules SCRIPT command=

The SCRIPT command sequentially executes the commands contained within the file filename. The script file itself may also contain script commands but the system ensures that no more than 10 levels of scripts are invoked at any one time to avoid recursion loops.

The script can contain any Hercules command.

The script command is handy for loading short programs that were entered into a text editor.

E.g., if the following program was in a file called 'hello.txt', you could load the program by entering :


 * script hello.txt**

at the Hercules console prompt.

r 2000= 05 C0 # BALR 12,0 r 2002= 41 20 C0 1E # LA 2,CCW1 load CCW address r 2006= 50 20 00 48 # ST 2,72(0,0) store at CAW r 200A= 9C 00 00 09 # LOOP1 SIO 9(0) start io for device #9 r 200E= 47 F0 C0 08 # B LOOP1 loop forever r 2020= 09 00 20 30 # CCW1 CCW 09,MSG,0,LENMSG r 2024= 00 00 00 0B r 2030= C8 C5 D3 D3 # MSG DC C'HELLO WORLD' r 2034= D6 40 E6 D6 r 2038= D9 D3 C4

If you then entered "u 2000.20", you would see : R00002000: 05C0 BALR 12,0 branch_and_link_register R00002002: 4120C01E LA 2,30(0,12) load_address R00002006: 50200048 ST 2,72(0,0) store R0000200A: 9C000009 SIO 9(0) start_io

And an "r 2020" : R:00002020:K:06=09002030 0000000B 00000000 00000000 ................ **** CCW * R:00002030:K:06=C8C5D3D3 D640E6D6 D9D3C400 00000000 HELLO WORLD..... R:00002040:K:06=00000000 00000000 00000000 00000000 ................ R:00002050:K:06=00000000 00000000 00000000 00000000 ................