From f8969fb5048b187f451920fe04f988d6ffa8261c Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Fri, 21 Jan 2011 11:31:43 +0100 Subject: [PATCH] interner aufbau - erster teil --- presentation.fs | 21 +++++++++++++++++---- presentation.p.fs | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/presentation.fs b/presentation.fs index 147ccee..3b660f4 100755 --- a/presentation.fs +++ b/presentation.fs @@ -210,6 +210,19 @@ ptype-reset :
  • ( -- addr u0 , xt-{li} 0 ) ['] {li} , here 0 , 0 ; : {/li} ( addr -- addr ) cr ; :
  • ( addr len -- , xt-{/li} ) ['] {/li} , swap ! ; +33 constant table-color +: {|} ( addr -- addr ) + dup @ dup ptype-cursorx@ - \ addr > >-i + dup 1 < if + drop + else + 1- spaces + endif + ptype-curx ! table-color sgr ." |" 39 sgr cell+ +; +: <|> ( i -- addr , xt-{|} i ) ['] {|} , , ; +: {-} ( addr -- addr ) cr dup @ 0 table-color sgr +do [char] - emit loop 39 sgr cell+ cr ; +: <-> ( i -- addr , xt-{-} i ) ['] {-} , , ; variable enumerationCount ( -- addr ) : {||} ( addr -- addr ) \ increments enumeration count and prints prefix @@ -272,15 +285,15 @@ Create line-buffer max-line 2 + allot showLines printsource cr ; -: {source} ( -- ) ; +: {source} ( -- ) ; : ( -- , xt-{source} ) ['] {source} , ; -: {/source} ( -- ) dup dup dup dup @ swap cell + @ 2swap cell 2 * + +: {/source} ( -- ) dup dup dup dup @ swap cell + @ 2swap cell 2 * + @ swap cell 3 * + @ 1 printCodeHeader 4 cells + ; : ( -- , xt-{/source} ) ['] {/source} , , , , , ; -: {file} ( -- ) ; +: {file} ( -- ) ; : ( -- , xt-{file} ) ['] {file} , ; -: {/file} ( -- ) dup dup dup dup @ swap cell + @ 2swap cell 2 * + +: {/file} ( -- ) dup dup dup dup @ swap cell + @ 2swap cell 2 * + @ swap cell 3 * + @ 0 printCodeHeader 4 cells + ; : ( -- , xt-{/file} ) ['] {/file} , , , , , ; diff --git a/presentation.p.fs b/presentation.p.fs index 66724c9..e6026a1 100644 --- a/presentation.p.fs +++ b/presentation.p.fs @@ -97,6 +97,53 @@
  • !" Vordergrundfarbe: " s\" Brown !\" text\" " !! !" : " Brown !\" text"
  • !" 8 Farben sind moeglich:"

    farbendemo

    + + + !" Interner Aufbau" +

    + 71 <-> + 1 <|> !" Beschreibung" 18 <|> 56 <|> !" in forth" 71 <|> + 71 <-> + 1 <|> 18 <|> 56 <|> 71 <|> + 71 <-> +

    + + !" Interner Aufbau" +

    + 71 <-> + 1 <|> !" Beschreibung" 18 <|> 56 <|> !" in forth" 71 <|> + 71 <-> + 1 <|> !" Speicheraufbau" 18 <|> 56 <|> !\" here-\"stack\"" 71 <|> + 71 <-> +

    + + !" Interner Aufbau" +

    + 71 <-> + 1 <|> !" Beschreibung" 18 <|> s\" ...

    !\" text \"

    ..." !! 56 <|> !" in forth" 71 <|> + 71 <-> + 1 <|> !" Speicheraufbau" 18 <|> 56 <|> !\" here-\"stack\"" 71 <|> + 71 <-> +

    + + !" Interner Aufbau" +

    + 71 <-> + 1 <|> !" Beschreibung" 18 <|> s\" ...

    !\" text \"

    ..." !! 56 <|> !" in forth" 71 <|> + 71 <-> + 1 <|> !" Speicheraufbau" 18 <|> s\" {p} 5 {i} {!!} addr len {/i} {/p} " !! 56 <|> !\" here-\"stack\"" 71 <|> + 71 <-> +

    + + !" Interner Aublauf" +

    + 71 <-> + 1 <|> !" Speicheraufbau" 18 <|> s\" {p} 5 {i} {!!} addr len {/i} {/p} " !! 56 <|> !\" here-\"stack\"" 71 <|> +
    + 1 <|> !" Execute" 18 <|> s\" ^" !! 56 <|> 71 <|> + 71 <-> +

    +

    !" Zeit für Makros!!"