Changed round prompt .s and numbers.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
also streams also WebServer also WiFi
|
||||
vocabulary web-interface also web-interface definitions
|
||||
|
||||
: n. ( n -- ) <# #s #> type ; : ip# dup 255 and n. [char] . emit 256 / ;
|
||||
: ip# dup 255 and n. [char] . emit 256 / ;
|
||||
: ip. ( n -- ) ip# ip# ip# 255 and . ;
|
||||
|
||||
r|
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
( ANSI Codes )
|
||||
vocabulary ansi ansi definitions
|
||||
: n. ( n -- ) base @ swap decimal <# #s #> type base ! ;
|
||||
: esc 27 emit ; : bel 7 emit ;
|
||||
: clear-to-eol esc ." [0K" ;
|
||||
: scroll-down esc ." D" ;
|
||||
|
||||
@ -161,6 +161,7 @@ variable hld
|
||||
: u. ( u -- ) <# #s #> type space ;
|
||||
: . ( w -- ) base @ 10 xor if u. exit then str type space ;
|
||||
: ? ( a -- ) @ . ;
|
||||
: n. ( n -- ) base @ swap decimal <# #s #> type base ! ;
|
||||
|
||||
( Strings )
|
||||
: parse-quote ( -- a n ) [char] " parse ;
|
||||
@ -200,11 +201,12 @@ variable hld
|
||||
( Examine Memory )
|
||||
: dump ( a n -- )
|
||||
cr 0 do i 16 mod 0= if cr then dup i + c@ . loop drop cr ;
|
||||
: raw.s depth 0 max for aft sp@ r@ cells - @ . then next ;
|
||||
|
||||
( Input )
|
||||
variable echo
|
||||
variable echo -1 echo !
|
||||
: ?echo ( n -- ) echo @ if emit else drop then ;
|
||||
: ?echo-prompt echo @ if ." --> " then ;
|
||||
: ?echo-prompt echo @ if >r >r raw.s r> r> ." --> " then ;
|
||||
: accept ( a n -- n ) ?echo-prompt 0 swap begin 2dup < while
|
||||
key
|
||||
dup nl = if ?echo drop nip exit then
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
( Variable useful but non-critical words )
|
||||
|
||||
: .s ." <" depth <# #s #> type ." > "
|
||||
depth 0 max for aft sp@ r@ cells - @ . then next cr ;
|
||||
( Words built after boot )
|
||||
: assert ( f -- ) 0= throw ;
|
||||
|
||||
internals definitions
|
||||
@ -10,5 +7,6 @@ internals definitions
|
||||
forth definitions also internals
|
||||
: str= ( a n a n -- f) >r swap r@ <> if rdrop 2drop 0 exit then r> mem= ;
|
||||
: startswith? ( a n a n -- f ) >r swap r@ < if rdrop 2drop 0 exit then r> mem= ;
|
||||
: .s ." <" depth n. ." > " raw.s cr ;
|
||||
only forth definitions
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ transfer{
|
||||
(do) (?do) (+loop)
|
||||
parse-quote digit $@
|
||||
see. see-loop >name-length exit=
|
||||
see-one
|
||||
see-one raw.s
|
||||
tib-setup input-limit
|
||||
}transfer
|
||||
forth definitions
|
||||
|
||||
Reference in New Issue
Block a user