User Tools

Site Tools


plato:nosutils:tdisassemble.tassemble

Tape (Dis)Assembly

The TDisassemble and TAssemble subcommands are complementary functions to each other.

TDisassemble decomposes NOS blocked tape records into workstation-based files. These files (and the resulting recipe/map file generated by TDisassemble may then be used as input to the TAssemble subcommand which will reconstitute the tape.

TDisassemble

These subcommand are replacements for the old tools which convert .TAP images into individual files from a NOS I-format image and vice-versa.

  • nosicreate
  • tapextractIrec
  • tapextractSIrec
  • tapgenIrec
  • tapgenSIrec
  • gettap

The general form of the TAssemble subcommand is:

nosutils tassemble -c<ControlFile> <TapeFileName>

The general form of the TDisassemble subcommand is:

nosutils tdisassemble -c<ControlFile> -d<OutputDirectory> [-4 | -D] <TapeFileName>

Where:

  • ControlFile specifies the name of the text file containing the “recipe” needed to reconstruct the tape from individual host-based files.
  • TapeFileName specifies the name of the .TAP file to be generated from the ControlFile
  • OutputDirectory specifies the name of the directory from/into which the files will be imported/exported.

Examples: TDisassemble / TAssemble

The following are annotated examples of round-trip Disassemble/Assemble of a Deadstart Tape. The following are assumed:

  • The nosutils and gzip commands are located in the PATH. gzip is only needed if you are working with .gzipped tape files.
  • There already exists a target directory ds.files.
  • The user is familar with the structure of ANSI-labeled tapes.

All three of these examples are performed as written here and the same directory may be used because the

Invoke TDisassemble with the default option of simple binary file extraction from the tape:

nosutils tdisassemble -dds.files -cdeadstart.recipe.txt ds.tap

With the above options, the files(records) are extracted from the deadstart tape called ds.tap and each file(record) found is written to the directory ds.files with a filename prefix rec. Each recnnnnn file (with no file extension) is a packed image exactly as written to the .tap file image (2, big-endian, 60-bit words per 15 bytes).

nosutils tdisassemble -4 -dds.files -cdeadstart.recipe.4.txt ds.tap

With the above options, the files(records) are extracted from the deadstart tape called ds.tap and each file(record) found is written to the directory ds.files with a filename prefix rec. Each recnnnnn file (with a .b64 extension) is an image of little-endian 64-bit words containing each 60-bit value as written to the .tap file image (1, 60-bit word per 8 bytes).

nosutils tdisassemble -D -dds.files -cdeadstart.recipe.D.txt ds.tap

With the above options, the files(records) are extracted from the deadstart tape called ds.tap and each file(record) found is written to the directory ds.files with a filename prefix rec. Each recnnnnn file (with a .txt extension) is an image of CDC Display Code representing each 6-bit value as an 8-bit ASCII character.

In each case above, the text (recipe) file deadstart.recipe(.4 | .D).txt is written which describes the 'recipe' needed to reconstruct the tape image, verbatim.

Internal Checksums/Sequence numbers

When written to individual files, all sequencing/checksum information is stripped from the records and those are rewritten during TAssemble.

Recipe File Format

Each tape record is written to a host file and a record is written to the recipe file which tells the TAssemble subcommand how to re-build the tape image.

"legacy" Support

The original command-line utilities only supported the binary file(record) extraction to host files (no file extension). The two additional formats have been added to nosutils and will not be recognized/supported by the older individual command-line utilities.

The recipe file resembles the following for the sample deadstart tape, which was generated by the first example above.

(dc)("000001.txt") ;::n::::::ipl::::::: [ 480. bytes / # 1.] (dc)("000002.txt") ;::n::::::cd7::::::: [ 924. bytes / # 2.] (dc)("000003.txt") ;::n::::::cd6::::::: [ 930. bytes / # 3.] (dc)("000004.txt") ;::n::::::cd3::::::: [ 819. bytes / # 4.] (dc)("000005.txt") ;::n::::::cd4::::::: [ 939. bytes / # 5.] (dc)("000006.txt") ;::n::::::cd5::::::: [ 954. bytes / # 6.] (dc)("000007.txt") ;::n::::::cd2::::::: [ 924. bytes / # 7.] (dc)("000008.txt") ;::n::::::cd1::::::: [ 945. bytes / # 8.] (dc)("000009.txt") ;::n::::::plt::::::: [ 135. bytes / # 9.] (dc)("000010.txt") ;::n::::::edc::::::: [ 480. bytes / # 10.] (dc)("000011.txt") ;::n::::::ccd::::::: [ 1260. bytes / # 11.] (dc)("000012.txt") ;::n::::::ioq::::::: [ 3810. bytes / # 12.] (dc)("000013.txt") ;::n::::::app::::::: [ 2100. bytes / # 13.] (dc)("006256.txt") .proc,mail*i"c^y^b^e [ 774. bytes / #14008.] (dc)("006257.txt") .proc,mailprt*i,fn,p [ 315. bytes / #14009.] (dc)("006258.txt") .proc,mailedt*i,fn=( [ 240. bytes / #14010.] (dc)("006259.txt") .proc,mailprc*i,fn.o [ 690. bytes / #14011.] (dc)("006260.txt") ;::n::::::confer:::: [ 178659. bytes / #14058.] end-of-record(00) [#14059.] end-of-record(00) [#14060.] (dc)("006261.txt") ;::n::::::crstat:::: [ 104004. bytes / #14088.] (dc)("006262.txt") ;::n::::::icf::::::: [ 106944. bytes / #14116.] (dc)("006263.txt") ;::n::::::ctask::::: [ 9510. bytes / #14119.] (dc)("006264.txt") ;::n::::::ctaski:::: [ 1590. bytes / #14120.] (dc)("006265.txt") ;::n::::::tro::::::: [ 2730. bytes / #14121.] (dc)("006266.txt") ;::n::::::tri::::::: [ 720. bytes / #14122.] (dc)("006267.txt") ;::n::::::cdo::::::: [ 11565. bytes / #14126.] (dc)("006268.txt") ;::n::::::cdi::::::: [ 9279. bytes / #14129.] (dc)("006269.txt") ;::n::::::sco::::::: [ 20715. bytes / #14135.] (dc)("006270.txt") ;::n::::::sci::::::: [ 12555. bytes / #14139.] (dc)("006271.txt") ;::n::::::tso::::::: [ 11100. bytes / #14142.] (dc)("006272.txt") ;::n::::::tsi::::::: [ 9630. bytes / #14145.] (dc)("006273.txt") ;::n::::::bbo::::::: [ 18654. bytes / #14150.] (dc)("006274.txt") ;::n::::::bbi::::::: [ 21459. bytes / #14156.] (dc)("006275.txt") ;::n::::::udi::::::: [ 6255. bytes / #14158.] (dc)("006276.txt") ;::n::::::udo::::::: [ 8100. bytes / #14161.] (dc)("006277.txt") ;::n::::::ctask70::: [ 15510. bytes / #14166.] (dc)("006278.txt") ;::n::::::csd::::::: [ 4035. bytes / #14168.] (dc)("006279.txt") ;::n::::::8sf::::::: [ 1290. bytes / #14169.] (dc)("006280.txt") ;::n::::::8sn::::::: [ 1260. bytes / #14170.] (dc)("006281.txt") ;::n::::::8sd::::::: [ 774. bytes / #14171.] (dc)("006282.txt") ;::n::::::uio::::::: [ 2469. bytes / #14172.] (dc)("006283.txt") ;::n::::::craycmd::: [ 51219. bytes / #14186.] (dc)("006284.txt") ;::n::::::cdefine::: [ 11610. bytes / #14190.] (dc)("006285.txt") ;::n::::::csubmit::: [ 14244. bytes / #14194.] end-of-record(00) [#14195.] end-of-record(00) [#14196.] end-of-record(00) [#14197.] end-of-record(00) [#14198.] (dc)("006286.txt") ;::n::::::system:::: [ 27375. bytes / #14206.] end-of-record(17) [#14207.] end-of-file() ansi-label(EOF1UNLABELED. 000100010001000233480LLA:: 014207NOS 2.8-051 ) end-of-file() end-of-file() end-of-file() end-of-information() [6286. Total Records Written]

(DC)(...) | (60)(...) | (64)(...)

The statements (DC)(…) or (60)(…) or (64)(…) indicate the name and conversion format of the input file in the local directory, or in that directory indicated using the -d switch. This filename may contain spaces using the optional double-quote syntax, and all information following the closing filename parenthesis space is treated as “comments”.

For each file, the TDisassemble function writes a 20 character (2-CM Words) Display Code translation as an eye-catcher along with other data such as the number of bytes (decimal) found in the block, and the block number (decimal).

end-of-record(nn)

The end-of-record(nn) statement specifies an end of record mark with the specified level indicator. The remainder of the line following the closing parenthesis is considered “commentary”. TDisassemble writes the block sequence number for information only.

end-of-file()

The end-of-file() statement specifies and end of file mark. The remainder of the line following the closing parenthesis is considered “commentary”.

ansi-label(...)

The ansi-label(…) statement contains the actual ANSI label string (80-characters). Any characters following the closing parenthesis are considered to be “commentary”.

TAssemble

TAssemble is the functional inverse of TDisassemble and accepts the -d (Input directory) switch and the -c control/recipe file input switch ( required ).

Examples

To invert the TDisassemble examples above, the commands are simple:

nosutils tassemble -dds.files -cdeadstart.recipe.txt dsX.tap
nosutils tassemble -dds.files -4 -cdeadstart.recipe.txt ds4.tap

nosutils tassemble -dds.files -D -cdeadstart.recipe.txt dsD.tap

If none of the files contained in directory ds.files was modified, each of the above commands should generate a tape which is a binary duplicate of the original input tape ds.tap.

plato/nosutils/tdisassemble.tassemble.txt · Last modified: 2023/12/24 08:02 by 127.0.0.1