To use this file copy and paste this:    // #URL-lib "http://pin1.org/forthlib/flb/General/dump.flb"   into BV Terminal 3 or here to download.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // This is an extended memory dump (BDUMP) // does a 256 (16 x 16) block // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Full Contents of File

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// This is an extended memory dump (BDUMP)
// does a 256 (16 x 16) block
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

// ============ dump ======================
// (char---)
: ascii.
        dup  32  127  between
        if  emit  else  drop  [char]  .  emit  then
;       
// prints the ascii part
// ( addr ---)
: ascii16.
        dup  16  +  swap
        do
                i  c@  ascii.
        loop
;               
// prints the hex part
// ( addr---)
: hex16.
        dup  16  +  swap
        do
                i  c@  <#  #  #  #>  stype  space
        loop
;
//
: dumpHead
        ."  Address    "
        16  for
                i  <#  #  #  #>  stype  space
        next
;
variable  basehold               
// given an address will dump contents, leaves address ready
// for next dump.
: <0>bdump ( addr --- addr+256 )
        base  @  basehold  !  hex
        dumpHead  cr
        16  for
                dup  <#  #  #  #  #  #  #  #  #  #>  stype  space
                dup  hex16.  dup  space  ascii16.
                16  +  cr
        next
        basehold  @  base  !
;