.gitignore added. auf den here-stack speichern implementiert.

master
Denis Knauf 2010-12-15 21:26:58 +01:00
parent 8e9f1b4ab6
commit 063fc5e1d0
2 changed files with 22 additions and 17 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.swp

View File

@ -1,4 +1,5 @@
#! /usr/bin/gforth #! /usr/bin/gforth
: copy ( addrdst addrsrc len -- addrdstend ) : copy ( addrdst addrsrc len -- addrdstend )
over ( dst src len src ) + swap ( dst end src ) over ( dst src len src ) + swap ( dst end src )
do ( dst+ ) do ( dst+ )
@ -16,13 +17,16 @@
page_steps page_steps
( ... x seiten weiterspringen ... ) ( ... x seiten weiterspringen ... )
; ;
: csi 27 c, 91 c, : csi 27 91 ;
: <--> ; : <h> ( -- addr 0 ) 2 c, here 0 ;
: <_> ; : </h> ( addr len -- ) 3 c, swap ! ;
: <h> <--> ; : <p> ( -- addr 0 ) 4 c, here 0 ;
: <b> csi c, <_> ; : </p> ( addr len -- ) 5 c, swap ! ;
: <i> csi c, <_> ; : <i> ( -- ) 6 c, ;
: <np> begin , 0<> until ; : </i> ( -- ) 7 c, ;
: <b> ( -- ) 8 c, ;
: </b> ( -- ) 9 c, ;
\ : <np> begin , 0<> until ;
\ : <+> ( addr1 len1 addr2 len2 -- addrdst lendst ) \ : <+> ( addr1 len1 addr2 len2 -- addrdst lendst )
\ rot 2dup + here ( addr1 addr2 len2 len1 lendst addrdst ) \ rot 2dup + here ( addr1 addr2 len2 len1 lendst addrdst )
\ 2-rot -rot ( lendst addrdst addr1 len1 addr2 len2 ) \ 2-rot -rot ( lendst addrdst addr1 len1 addr2 len2 )
@ -30,22 +34,22 @@
\ 2dup chars allot ( dst allocated ) \ 2dup chars allot ( dst allocated )
\ copy copy \ copy copy
\ ; \ ;
: @@ ( addr len -- ) : !! ( len addr len -- len ) 1 c, dup rot , , + ;
here -rot ( dst src len )
copy drop
;
bye bye
<presentation> <presentation>
s" Dies ist eine Testpresentation" <h> <h> s" Dies ist eine Testpresentation" !! </h>
s" Eines Tages hatten wir (" @@ <b> s" Harald Steinlechner" @@ </b> s" und" @@ <p>
<b> s" Denis Knauf" @@ </b> s" die tolle Idee, eine Presentationssoftware zu schreiben" @@ <p> s" Eines Tages hatten wir (" !! <i> s" Harald Steinlechner" !! </i>
s" und" !! <i> s" Denis Knauf" !! </i>
s" die tolle Idee, eine Presentationssoftware zu schreiben" !!
</p>
<np> <np>
s" Ergebnis:" @@ <h> <h> s" Ergebnis:" !! </h>
<b> s" Das hier" @@ </b> <p> <p> <b> s" Das hier" !! </b> </p>
<np> <np>
s" Sieht doch garnicht so schlecht aus" @@ <p> <p> s" Sieht doch garnicht so schlecht aus" !! </p>
</presentation> </presentation>
\ presentation ist gestartet: erste Seite wird angezeigt \ presentation ist gestartet: erste Seite wird angezeigt