home *** CD-ROM | disk | FTP | other *** search
- \ FTCHSTOR.SEQ words that fetch or store data in the target micro
-
- \ *******************************************************************
- \
- \ Write and Read bytes and words in target micro memory
- \
- \ -------------------------------------------------------------------
-
- : (t!) ( word target-addr -- ) \ write one target memory word
- sendword \ address
- 1 com-out \ count = 1
- sendword \ data word
- key? if key drop ." aborted" then ;
-
- : t! ( word target-addr -- ) \ write one target memory word
- 6 command (t!) ;
-
- : t!w ( word target-addr -- ) \ write a word in the alternate register set
- 14 command (t!) ;
-
- : (tc!) ( byte target-addr -- ) \ write one target memory byte
- sendword \ address
- 1 com-out \ count = 1
- com-out \ send the byte
- ;
-
- : tc! ( byte target-addr -- ) \ write one target memory byte
- 3 command (tc!) ;
-
- : tc!w ( byte target-addr -- ) \ write a byte in the alternate register set
- 12 command (tc!) ;
-
- : tfill ( target-addr length value -- ) \ fill target memory with a byte
- 24 command
- rot sendword \ address
- swap sendword \ length
- com-out \ send the byte value
- ;
-
- : (t@) ( target-address -- w ) \ fetch one target memory word
- sendword \ address
- 1 com-out \ count = 1
- getword ; \ get data
-
- : t@ ( target-address -- ) \ fetch one target memory word
- 7 command (t@) ;
- : t@w ( target-address -- ) \ fetch a word in the alternate register set
- 15 command (t@) ;
-
- : (tc@) ( target-address -- ) \ fetch one target memory byte
- sendword \ address
- 1 com-out \ count = 1
- getbyte ; \ get data
-
- : tc@ ( target-address -- ) \ fetch one target memory byte
- 4 command (tc@) ;
- : tc@w ( target-address -- ) \ fetch a byte in the alternate register set
- 13 command (tc@) ;
-
- : 0seg-dump ( a n -- ) 0 -rot ldump ; \ byte dump with segment = 0
- : 0seg-wdump ( a n -- ) 0 -rot lwdump ; \ word dump with segment = 0
-
- : tdump ( a n -- ) \ dump target memory bytes
- ['] tc@ is dumpc@ 0seg-dump ['] %dumpc@ is dumpc@ ;
-
- : alt-tdump ( a n -- ) \ dump target memory bytes of alternate register set
- ['] tc@w is dumpc@ 0seg-dump ['] %dumpc@ is dumpc@ ;
-
- : twdump ( addr len -- ) \ dump out target word contents
- ['] t@ is dump@ 0seg-wdump ['] %dump@ is dump@ ;
-
- : alt-twdump ( a n -- ) \ dump target memory words of alternate register set
- ['] t@w is dump@ 0seg-wdump ['] %dump@ is dump@ ;
-
-
- : tEDIT ( a n -- ) \ edit target byte memory
- 2 !> nwidth
- ['] dln is medln ['] 0seg-dump is medump
- ['] tc@ is dumpc@ ['] tc! is mec! mem-edit ;
-
- : twEDIT ( a n -- ) \ edit target word memory
- 4 !> nwidth
- ['] dlnw is medln ['] 0seg-wdump is medump
- ['] t@ is dump@ ['] t! is mec! mem-edit ;
-
-