💾 Archived View for mirrors.apple2.org.za › archive › apple.cabi.net › Utilities › NYBBLER.bxy.DOCS.… captured on 2024-05-10 at 12:27:01.

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

THE NYBBLER DOCUMENTATION:

The NYBBLER is a multi-function nibble editor that uses many of the routines and
programs presented in the COPY PROTECTOR'S NOTEBOOK VOLUME ONE.  The source code
is included so that the user can see the modifications and/or adaptations of the
NOTEBOOK'S programs to make them viable.  In order to print the source code, one
must run the program called LISTER on the master disk and list the program
T.NYBBLER.

Upon executing NYBBLER the user is presented with the main display screen which
includes the title message, command line, status line and buffer display.  The
"COMMAND:" prompt is the main interface to all possible commands.  

Some useful information or how the NYBBLER works:

1.  This program uses memory from $4000 to $7FFF as its read buffer.  The program
itself starts at $800, and is under 12 pages in length. 

2.  The status line consists of the following:

    S=  Which stands for current controller card slot.  It is controlled by
pressing "S".  Its values range from 0-7.
    D=  Which stands for current drive.  All read and write operations will use
this value.  It is controlled by pressing "D".  Its values range from 1-2.
    R=  Which stands for current read/write algorithm.  Keys from 1-3 set its
value.
    F=  Which stands for current location of buffer pointer.  The following keys
control this value:

          B: move cursor to beginning of buffer ($4000)
          E: move cursor to end of buffer ($7FFF)  
          H: move cursor up one page
          L: move cursor down one page
          I: move cursor up one line
          M: move cursor down one line 
          J: move cursor one byte left
          K: move cursor one byte right

   The last two words "0000/0000" represent the track start and track end.  They
are used only when writing data to the disk.  
     crtl B: set track start to current cursor location.
     crtl E: set track end to current cursor location.

3.  The screen displays one page of the buffer.  The current buffer pointer in
memory is referenced by a flashing cursor and the "F=" on the status line.
.ff
4.  The read routine uses the expanded read routine presented in the section INTO
THE REALM OF OBSCURITY.  
   Pressing "1" enables a transient bit-insert read (writes 9-bit sync bytes
during writing). 
   Pressing "2" enables a 9-bit sync read (writes 9-bit sync bytes during
writing).  
   Pressing "3" enables a 10-bit sync read (writes 10-bit sync bytes during
writing).

When the desired track is read into memory, the high bits of the sync bytes are
removed.  The routine that displays the buffer on the screen will flag all bytes
with the MSB off as inverse bytes.  The status of each byte can be changed by
placing the cursor over the desired byte and pressing "control S".

5.  A "R" from the command mode will read a track from a disk depending on the
internal flags, that is, drive, slot, and read algorithm.  After reading the
cursor is set to $4000.

6.  The buffer writer presented in CHAPTER TWO is used to write data back out to
the disk.  In regards to writing data, if the track start or track end have never
been set, or track end precedes track start, or the track length exceeds $2000
bytes, or the target disk is write protected then the write request will be
aborted.

7. A ctrl "W" from the command mode will start the write mode.  It uses the same
parameters as the read function in addition to the values of track start and
track end.  The value at $4000 is used as an erase byte, that is, the entire
track will be written with this byte before user data is written.  See the EDIT
function on how to change the value at $4000.  Note:  The byte at $4000 is
written as a 10-bit, sync byte always.

8.  The routine that moves the disk arm is the TRACK MOVER presented in CHAPTER
ONE.  Examine the source code to see how the IOB was configured.  Track range
allowed is $00 to $23.

9.  When a "T" is entered, user is prompted with "TRACK:".  Up to five characters
are allowed.  First two values are integral track to seek.  If a period does not
follow these two bytes, then a ".00" is assumed else user should use ".00",
".25", ".50", or ".75".  Note: only the first byte following the decimal point is
evaluated.
.ff
10.  All commands that require strings of data use a special input routine. 
These commands include, TRACK, DELETE ,FIND, INSERT, and EDIT.  The input routine
uses a value in zero page to determine string length accepted.  If the string
being inputted exceeds this value a click will sound.  Use the RETURN key to pass
string value.  Use left arrow key to correct errors.  Only hex values and a
period are allowed as input.  The right arrow moves cursor to right but does not
update buffer contents.

11.  The find routine is entered by typing a "F" at the command level.
 
A "FIND:" signals user to input string of hex bytes to find.  Program will then
search buffer from cursor position to $7FFF.  Up to 15 bytes allowed.  If not
found, cursor will not change.  If found, cursor is placed at start of first
occurence of string in read buffer.  If an odd number of bytes is entered, then
function is aborted.  Note: a null string will abort all string functions.

12.  The edit function is entered by pressing "control C". 

The printing of "EDIT:" signals beginning of input.  Up to 15 bytes allowed. 
User then must enter string of bytes that are to replace those at the current
cursor position.  Note:  program does not check to make sure bytes are valid disk
bytes.

13.  The delete function is entered by pressing "control D".  

The printing of "DELETE:" prompts user to enter number of bytes to be deleted at
the current cursor position.  Example: entering an "01" (hex byte) will delete
the byte covered by the cursor.  A sync $FF will be brought into the end of the
buffer for every byte deleted.  Note: deleting many bytes will take the program
an inordinate amount of time due to the algorithm used (it is slow but compact).

14.  Pressing "control I" enters the insert mode. 

The program is ready to accept values to be inserted with the printing of
"INSERT:".  Bytes entered will be inserted at cursor position.  Again validity of
bytes is not checked.

15.  To exit the NYBBLER press "Q".  A reset message will be printed.  If RESET
is presssed then program will do a coldstart with all parameters set to initial
values.
.ff
16.  Two special functions have been included with the NYBBLER.  The first one is
reached by typing in a "C" from the command mode.

The user is presented with a new status line consisting of the following:

A prompt of "NUMBER:" and the following codes on the status line:
 
   H=  Which stands for a hex number up to four digits.
   D=  Which stands for a decimal number of five digits.
   B=  Which stands for a binary number of eight characters (0-255).
   F=  Which stands for a 4-4 encoded number (0-255).
   L=  Which stands for the current track length.

If you have not guessed, "C" stands for calculate and this new mode allows the
user to convert between hex, decimal, binary, and 4-4 encoded numbers.

17.  When an even-digited number is entered at the "NUMBER:" prompt then this
number will be converted to its decimal equivalent; its lower byte will be
coverted to binary; this binary number will then be converted to a 4-4 encoded
pair.  (Please see the section INVALID BYTES in CHAPTER TWO for a discussion on
4-4 encoded bytes).  Note:  Only 4 digits converted correctly.

18.  When a number ending with a "." is entered at the "NUMBER:" prompt it will
be converted to hex and the appropriate conversions performed.  Only 5 digits
will be converted correctly.

19.  When a number ending with a "%" is entered at the prompt it will considered
as binary and converted appropriately.  Only 8 digits will be converted
correctly.

20.  When a hex pair is separated by a "." , for example, "12.12" it will be
considered as a 4-4 byte pair and converted as such.  Of course only 4 digits
will be converted correctly.

21.  The "L=" displays a value calculated from subtracting the track start from
track end.  It will be zero if 1) track end precedes track end 2) track length
exceeds $2000 bytes or 3) track start or end have never been set.

22.  A null input at the "NUMBER:" prompt will return to the "COMMAND:" mode. 
Thus if the user wants to count the number of bytes between two distinct bytes,
all that is required is to set track start and track end and hit "C" to see the
length, and press RETURN to go back to the main command mode.
.ff
23.  Pressing an "A" from the command mode will allow the user to examine the bit
status of sync bytes on any disk.  The routine is taken from the section BIT BY
BIT in CHAPTER TWO.  It will use the current parms to read the disk (slot, drive,
and track).  The user will see about one page of data occur on the screen
accompanied by a "READING..." on the prompt line.  By hitting any key the disk
will be read, the RETURN key causes the drive to quit spinning and a return to
the command mode.  

   A "." =  normal 8-bit byte
   A "1" =  9-bit sync byte
   A "2" = 10-bit sync byte
   A "3" = >10-bit sync byte

The user should refer to the germane section in CHAPTER TWO for the appropriate
use of this function.  But basically it provides a way to determine the type of
sync byte present on a certain disk so that read mode 1, 2, or 3 can be used
correctly.

   Mostly mixed "."'s and "1"'s imply read mode 1.
   Mostly "1"'s imply read mode 2.
   Mostly "2"'s imply read mode 3.

Because the read routine depends heavily on the disk data being read to be at the
same speed it was formatted, the user can also adjust drive speed so that it
matches the speed at which the original disk was formatted.  Please see SECTION
BIT BY BIT in CHAPTER TWO for the speed charts.
.ff
KEY FUNCTION SUMMARY  /  FUNCTION (x=any hex value)
-------------------------------------------------
     S    increments value of slot (mod 8) 
     D    change drive (1 or 2)
     B    jumps to beginning of buffer
          set cursor to $4000
     E    jumps to end of buffer  
          set cursor to $7FFF
     I    move cursor one line up
     M    move cursor one line down
     J    move cursor one byte left
     K    move cursor one byte right
     H    move cursor one page up
     L    move cursor one page down

        ALL READ MODES REPORTED BY "R=xx"

     1    set transient read mode
     2    set 9-bit read mode
     3    set 10-bit read mode

     R    read current displayed track
          set cursor to $4000
     T    get track of form "xx.xx"
          RETURN accepts 
ctrl S    change status of byte under cursor
          normal=8-bit  inverse=sync
ctrl D    enter delete mode
          value entered will delete "xx" bytes starting at cursor
ctrl C    enter edit mode
          values entered will change bytes starting at cursor
ctrl I    enter insert mode
          values entered will insert bytes starting at cursor
     F    enter find mode
          search buffer for entered byte string starting at cursor
          if found move cursor to beginning of found string
          if not found cursor does not move

        WRITE MODE FUNCTIONS
 
ctrl B    set track start "xxxx/"
ctrl E    set track end "/xxxx"

ctrl W    write track to current drive and track
          byte at $4000 used to erase track before writing
          if track end or track start are not set "0000/0000"
           then abort and sound bell
          if track end precedes track start then  
           abort and sound bell
          if disk write protected then disk will stop 
           spinning, operation will abort and bell will sound 
     Q    exit program
          pressing RESET will reenter program
.ff

PAGE TWO
---------

       ENTER CALCULATOR MODE BY PRESSING "C" - EXIT WITH NULL STRING

    LET x = hex digit (0-F)
    LET y = decimal digit (0-9)
    LET z = binary digit (0-1)

  xxxx    =  hex number to convert (must = 2 or 4 digits)
  yyyyy.  =  decimal number to convert (must not >5 digits)
zzzzzzzz% =  binary number to convert (must not >8 digits)
  xx.xx   =  4-4 encoded number to convert (must = 4 digits)

     LIMITS:  $FFFF = 65506
     ONLY LOWER BYTE OF HEX NUMBER IS CONERTED TO BINARY AND 4-4 
     ; AND VICE VERSA.

    "A"   analyze sync byte status of displayed track.
          "."  =  normal byte
          "1"  =  9-bit byte
          "2"  =  10-bit byte
          "3"  =  >10-bit byte
10-bit byte