
                                   DSCRIPT
                                 version 1.00
                               (x) 2000 Z0MBiE

                                What's DSCRIPT
                                ~~~~~~~~~~~~~~

  DSCRIPT is a subroutine to generate some code into DEBUG script.
  Generated script will assemble code and, depending on flags passed to the
  subroutine, execute assembled code or write it to the file of a given name.

                      including DSCRIPT into your source
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  include DSCRIPT.INC

  push    offset input_buffer
  push    input_buffer_size
  push    offset output_buffer
  push    max_output_buffer_size
  push    offset obufsize  ; ptr to size of the generated script, or NULL
  push    offset filename     ||  input_entry-input_buffer   ; loaded at 100h
  push    DS_FL_WRITEFILE(=0) ||  DS_FL_EXECUTE(=1)
  call    dscript

  or      eax, eax      ; EAX=DS_ERR_SUCCESS(=0) -- all ok
  je      success
  dec     eax           ; EAX=DS_ERR_BADSIZE(=1) -- bad size of the buffer
  je      bad_buf_size

                                   FEATURES
                                   ~~~~~~~~

  Maximal input buffer size is 65280 bytes.
  Maximal output buffer size needed = (512+<input_size>*43/16).
  If pointer to filename is NULL, no file-writing part of script will be
  generated.

