restore (r). interner-ablauf

This commit is contained in:
Denis Knauf 2011-01-21 12:11:21 +01:00
parent f8969fb504
commit 63c491da37
2 changed files with 26 additions and 9 deletions

View file

@ -334,6 +334,8 @@ Create line-buffer max-line 2 + allot
: pres_page_from ( addr -- addr ) cell+ ;
: pres_page_to ( addr -- addr ) 2 cells + ;
variable pres-restore 3 cells allot
\ faddr: erste Seitenzeigeradresse (letzte Presentationsseite)
\ laddr: letzte Seitenzeigeradresse (erste Presentationsseite)
\ paddr: derzeitige Seitenzeigeradresse
@ -367,12 +369,16 @@ Create line-buffer max-line 2 + allot
validpage? 0 tuck 2-rot drop \ i 0 faddr laddr paddr0
dup showpage' 0 2rot drop \ faddr laddr paddr0 0 i
if beep then
2over swap pres-restore !
pres-restore cell+ !
over pres-restore 2 cells + !
;
: n ( faddr laddr paddr 0 [u] -- faddr laddr paddr 0 ) page_steps cells - showpage ;
: g ( faddr laddr paddr 0 u -- faddr laddr paddr 0 ) cells nip nip over swap - showpage ;
: p ( faddr laddr paddr 0 [u] -- faddr laddr paddr 0 ) page_steps cells + showpage ;
: u ( faddr laddr paddr X -- faddr laddr paddr 0 ) drop showpage ;
: q bye ;
: r ( -- faddr laddr paddr 0 ) pres-restore @ pres-restore cell+ @ pres-restore 2 cells + @ 0 ;
: <presentation> ( -- addr0 0 addr1 , xt-{np} ) here 0 here ['] {np} , ;
: </presentation> ( 0 <addr...> -- faddr laddr paddr 0 !! endaddr 0 0 0 0 <...addr> )

View file

@ -38,6 +38,18 @@
; immediate
: farbendemo farbendemo' </bc> </fc> ;
: interner-ablauf
{ a b c d }
<h> !" Interner Ablauf" </h>
<p>
71 <->
1 <|> !" Speicheraufbau" 18 <|> s\" {p} 5 {i} {!!} addr len {/i} {/p} " !! 56 <|> s\" here-\"stack\"" !! 71 <|>
<br>
1 <|> a b !! 18 <|> <b> c d !! </b> 56 <|> 71 <|>
71 <->
</p>
;
<presentation>
<p>
<file> s" header.txt" 0 100 </file>
@ -134,15 +146,14 @@
1 <|> !" Speicheraufbau" 18 <|> <b> s\" {p} 5 {i} {!!} addr len {/i} {/p} " !! </b> 56 <|> !\" here-\"stack\"" 71 <|>
71 <->
</p>
<np>
<h> !" Interner Aublauf" </h>
<p>
71 <->
1 <|> !" Speicheraufbau" 18 <|> s\" {p} 5 {i} {!!} addr len {/i} {/p} " !! 56 <|> !\" here-\"stack\"" 71 <|>
<br>
1 <|> !" Execute" 18 <|> <b> s\" ^" !! </b> 56 <|> 71 <|>
71 <->
</p>
<np> s" Execute" s" ^" interner-ablauf
<np> s" {p}" s" ^" interner-ablauf
<np> s" Execute" s" ^" interner-ablauf
<np> s" Execute" s" ^" interner-ablauf
<np> s" {!!}" s" ^---^" interner-ablauf
<np> s" Execute" s" ^" interner-ablauf
<np> s" Execute" s" ^" interner-ablauf
<np>
<p>