( The Bequest Globe Runes: , album ; portal : archive Map: 0x1800 - 0x3000 Lexicon 0x3000 - 0x8000 Diary 0x8000 - 0xffff Output ) %+ { ADD } %- { SUB } %/ { DIV } %< { LTH } %> { GTH } %= { EQU } %! { NEQ } %++ { ADD2 } %-- { SUB2 } %// { DIV2 } %<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 } %1-- { #0001 -- } %2++ { INC2 INC2 } %EMIT { #18 DEO } %DEBUG { ;print-hex/byte JSR2 #0a EMIT } %DEBUG2 { ;print-hex/short JSR2 #0a EMIT } %PRINT { ;print-string JSR2 #0a EMIT } %PRINT-CR { ;print-hex/short JSR2 #0d EMIT } %RTN { JMP2r } %HALT { #0101 .System/debug DEO2 BRK } %ERROR { ;error JMP2 } %MOD { DUP2 DIV MUL SUB } %MOD2 { DIV2k MUL2 SUB2 } %GET-DEPTH { DUP2 #0002 -- LDA ;chex JSR2 } %REMOVE-LINEBREAKS { #0a #00 ;cswp JSR2 } %REWIND { #00 ;prev-char JSR2 INC2 } ( framework ) %^" { ;write JSR2 } %^' { ;write/char JSR2 } %^< { STH2 LIT '< ^' STH2r ^" LIT '> ^' } %^> { STH2 LIT '< ^' LIT '/ ^' STH2r ^" LIT '> ^' } %^<> { STH2k ^< ^" STH2r ^> } %RUNE-ALBUM { LIT ', } %RUNE-PORTAL { LIT '; } %RUNE-ARCHIVE { LIT ': } %TERM-NAME-SIZE { #0016 } %LEXICON { #1800 } %LEXICON-SIZE { #1800 } %DIARY { #3000 } %DIARY-SIZE { #5000 } %FILE { #8000 } %FILE-SIZE { #7fff } ( devices ) |00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1 ] |10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ] |a0 @File [ &vector $2 &success $2 &pad $4 &name $2 &length $2 &load $2 &save $2 ] |b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ] ( variables ) |0000 @term ( 0080 ) &name $16 ( term name limit ) &pict $4 &diary $60 &input $30 &output $30 |00fe @head $2 ( head ) ( program ) |0100 ( -> ) ;print-arvelie JSR2 ;load JSR2 ;validate JSR2 ,focus-page LDR ;build-one JCN2 ;build-all JMP2 HALT BRK @focus-page $1 @error ( name* msg* -- ) SWP2 1-- &name-loop INC2 LDAk [ DUP EMIT ] ,&name-loop JCN POP2 #20 EMIT 1-- &msg-loop INC2 LDAk [ DUP EMIT ] ,&msg-loop JCN POP2 #0a EMIT HALT RTN @load ( -- ) ;lexicon-path ,&lexicon JSR RTN &lexicon ( path* -- ) ( load lexicon ) .File/name DEO2 LEXICON-SIZE .File/length DEO2 LEXICON STH2k .File/load DEO2 STH2r REMOVE-LINEBREAKS RTN &diary ( path* -- ) DIARY DIARY-SIZE ;mclr JSR2 ( load diary ) .File/name DEO2 DIARY-SIZE .File/length DEO2 DIARY STH2k .File/load DEO2 STH2r REMOVE-LINEBREAKS RTN RTN @validate ( -- ) ;diary-path-pages/end ;diary-path-pages &loop LDA2k ;load/diary JSR2 ,&check JSR 2++ GTH2k ,&loop JCN POP2 POP2 RTN &check ( name* -- name* ) DIARY &while ( test length ) DUP2 ;slen JSR2 #003f << ,&ok-length JCN DUP2 ;error-diary-name-length ERROR &ok-length ( test term ) #000a ++ DUP2 #09 ;has-char JSR2 #00 = ,&skip JCN ( bound ) DUP2 #09 ;next-char JSR2 STH2 ( clip ) #00 STH2kr STA ( flag ) DUP2 ;find-term JSR2 #0000 !! ,&ok-found JCN DUP2 ;error-term-name-unknown ERROR &ok-found ( unclip ) #09 STH2r STA &skip ( goto eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN POP2 RTN @build-one ( -> ) ;focus-page ;find-term JSR2 ;build-page JSR2 HALT BRK @build-all ( -- ) LIT2r 0000 LEXICON &while ( move to name ) 2++ ( display ) STH2kr PRINT-CR INC2r ( build ) DUP2 ,build-page JSR ( goto eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN POP2 POP2r HALT RTN ( build ) @build-page ( name* -- ) ( term name limit ) DUP2 ;slen JSR2 TERM-NAME-SIZE << ,&namelength-ok JCN ;error-term-name-size ERROR &namelength-ok ( cleanup ) ( clear zeropage ) #0000 #00ff ;mclr JSR2 ( clean output ) FILE FILE-SIZE ;mclr JSR2 ( reset head ) FILE .head STZ2 ( fill name ) DUP2 ;term/name ;scpy JSR2 ( fill diary ) DUP2 ;find-diary JSR2 DUP2 #0000 == ,&continue JCN DUP2 ;term/diary #0050 ;mcpy JSR2 ( copy pict ) DUP2 #0006 ++ ( clip bound ) DUP2 #0003 ++ STH2 ( clip start ) #00 STH2kr STA ( clip wrap ) ;term/pict ;scpy JSR2 ( clip restore ) #09 STH2r STA &continue POP2 ( input path ) ;input-path ;term/input STH2k ;scat JSR2 DUP2 STH2kr ;scat JSR2 ;htm-ext STH2r ;scat JSR2 ;term/input #20 [ LIT '_ ] ;cswp JSR2 ( output path ) ;output-path ;term/output STH2k ;scat JSR2 DUP2 STH2kr ;scat JSR2 ;html-ext STH2r ;scat JSR2 ;term/output #20 [ LIT '_ ] ;cswp JSR2 ( render ) ;doctype ^" ;html-tag ^< ( head ) ;head-tag ^< ;charset-attr ;charset-txt ;add-meta-tag JSR2 ;stylesheet-txt ;stylesheet-type ;stylesheet-path ;add-link-tag JSR2 ;shortcuticon-txt ;shortcuticon-type ;shortcuticon-path ;add-link-tag JSR2 ;title-tag ^< ;title-txt ^" [ LIT 20 ] ^' ;mdash-entity-txt ^" [ LIT 20 ] ^' DUP2 ^" ;title-tag ^> ;head-tag ^> ( body ) ;body-tag ^< ;header-tag ^< ;home-path ;add-a-tag JSR2 ;logo-path ;title-txt ;add-img-tag JSR2 ;a-tag ^> ;header-tag ^> ;build-page-nav JSR2 ;build-page-main JSR2 ;build-page-footer JSR2 ;body-tag ^> ;html-tag ^> ( check file ) .head LDZ2 FILE -- FILE-SIZE << ,&size-ok JCN ;error-output-size ERROR &size-ok ( FILE ;validate-output JSR2 ) ( save file ) ;term/output .File/name DEO2 .head LDZ2 FILE -- .File/length DEO2 FILE .File/save DEO2 .head LDZ2 FILE -- ;print-hex/short JSR2 #20 EMIT ;print-string JSR2 #0a EMIT RTN @build-page-nav ( name* -- name* ) ;nav-tag ^< GET-DEPTH #00 = ,&no-siblings JCN ( parents ) GET-DEPTH #02 < ,&no-parents JCN DUP2 ;find-parent JSR2 ;find-parent JSR2 ,&build-children JSR POP2 &no-parents ( siblings ) GET-DEPTH #01 < ,&no-siblings JCN DUP2 ;find-parent JSR2 ,&build-children JSR POP2 &no-siblings ( children ) ,&build-children JSR ;nav-tag ^> RTN &build-children ( name* -- name* ) ;ul-tag ^< DUP2 ( stash depth ) GET-DEPTH STH ( start after ) DUP2 ;slen JSR2 ++ INC2 &while ( stop at sibling ) LDAk ;chex JSR2 STHkr = ,&end JCN ( when depth+1 ) LDAk ;chex JSR2 STHkr INC NEQ ,&continue JCN ;li-tag ^< DUP2 2++ ;add-local JSR2 ;li-tag ^> &continue ( move to eol ) 2++ &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN &end POP2 POPr ;ul-tag ^> RTN @build-page-main ( name* -- name* ) ;main-tag ^< ( picture ) ;term/pict LDA #00 = ,&no-picture JCN ;term/diary ;build-module-photo JSR2 &no-picture ( body ) ;build-page-body JSR2 ;build-page-module JSR2 ;build-page-special JSR2 ;build-page-calendar JSR2 ;main-tag ^> RTN @build-page-body ( name* -- name* ) ( max include size ) #8000 FILE DUP2 ;slen JSR2 ++ #8000 -- -- STH2k #0000 !! ,&no-null JCN ;error-include-size ERROR &no-null ( write body ) ;term/input .File/name DEO2 STH2kr .File/length DEO2 .head LDZ2 DUP2 .File/load DEO2 .File/success DEI2 ++ .head STZ2 ( file is missing ) .File/success DEI2 #0000 !! ,&no-blank JCN ;error-include-missing ERROR &no-blank POP2r RTN @build-page-module ( term* -- term* ) DUP2 1-- LDA RUNE-ALBUM ! ,&no-album JCN ;build-module-album JSR2 RTN &no-album DUP2 1-- LDA RUNE-PORTAL ! ,&no-portal JCN ;build-module-portal JSR2 RTN &no-portal DUP2 1-- LDA RUNE-ARCHIVE ! ,&no-archive JCN ;build-module-archive JSR2 RTN &no-archive RTN @build-page-special ( term* -- term* ) DUP2 ;index-txt ;scmp JSR2 #00 = ,&no-index JCN ;build-special-index JSR2 RTN &no-index DUP2 ;calendar-txt ;scmp JSR2 #00 = ,&no-calendar JCN ;build-special-calendar JSR2 RTN &no-calendar DUP2 ;journal-txt ;scmp JSR2 #00 = ,&no-journal JCN ;build-special-journal JSR2 RTN &no-journal RTN @build-special-index ( -- ) ;ul-tag ^< LEXICON &while ( move to name ) 2++ ;li-tag ^< DUP2 ;add-local JSR2 ;li-tag ^> ( move to eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ;&while JCN2 POP2 ;ul-tag ^> RTN @build-special-calendar ( -- ) ;ul-tag ^< ;diary-path-pages/end ;diary-path-pages &loop LDA2k ;load/diary JSR2 ,&append-li JSR 2++ GTH2k ,&loop JCN POP2 POP2 ;ul-tag ^> RTN &append-li ( name* -- name* ) DIARY &while DUP2 #0005 ++ LDA [ LIT '+ ] ! ;&continue JCN2 ( break list on year change ) DUP2 INC2 LDA [ STHk ] ;&last LDA = ,&no-yearchange JCN ;ul-tag ^> ;ul-tag ^< &no-yearchange ;li-tag ^< DUP2 ;build-module-event JSR2 ;li-tag ^> ( save last ) [ STHr ] ;&last STA &continue ( goto eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ;&while JCN2 POP2 RTN &last $1 @build-special-journal ( -- ) #00 ;&limit STA ;diary-path-pages/end ;diary-path-pages &loop LDA2k ;load/diary JSR2 ,&append-figure JSR 2++ GTH2k ,&loop JCN POP2 POP2 RTN &append-figure ( name* -- name* ) DIARY &while ;&limit LDA #20 > ,&end JCN DUP2 ;no-picture ;log-has-picture JSR2 ,&continue JCN DUP2 ;build-module-photo JSR2 ;&limit LDA INC ;&limit STA &continue ( goto eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN &end POP2 RTN &limit $1 @build-page-calendar ( name* -- name* ) ;ul-tag ^< STH2 ;diary-path-pages/end ;diary-path-pages &loop LDA2k ;load/diary JSR2 STH2kr ,&append-li JSR INC2 INC2 GTH2k ,&loop JCN POP2 POP2 STH2r ;ul-tag ^> RTN &append-li ( name* -- ) STH2 DIARY &while DUP2 #0005 ++ LDA [ LIT '+ ] ! ,&continue JCN ( host is term ) DUP2 ;term/name ;log-has-term JSR2 #01 ! ,&continue JCN ;li-tag ^< DUP2 ;build-module-event JSR2 ;li-tag ^> &continue ( goto eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN POP2 POP2r RTN @build-module-album ( name* -- name* ) STH2 ;diary-path-pages/end ;diary-path-pages &loop LDA2k ;load/diary JSR2 STH2kr ,&append-figure JSR INC2 INC2 GTH2k ,&loop JCN POP2 POP2 STH2r RTN &append-figure ( name* -- ) STH2 DIARY &while ( picture is blank ) DUP2 ;no-picture ;log-has-picture JSR2 ,&continue JCN ( picture is head ) DUP2 ;term/pict ;log-has-picture JSR2 ,&continue JCN ( host is term ) DUP2 ;term/name ;log-has-term JSR2 #01 ! ,&continue JCN DUP2 ;build-module-photo JSR2 &continue ( goto eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN POP2 POP2r RTN @build-module-portal ( name* -- name* ) ( stash depth ) DUP2 GET-DEPTH STH ( start after ) DUP2 ;slen JSR2 ++ INC2 &while ( stop at sibling ) LDAk ;chex JSR2 STHkr = ,&end JCN ( when depth+1 ) LDAk ;chex JSR2 STHkr INC NEQ ,&continue JCN DUP2 2++ ;find-diary JSR2 DUP2 #0000 == ,&no-diary JCN DUP2 ;build-module-photo JSR2 &no-diary POP2 &continue ( move to eol ) 2++ &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN &end POP2 POPr ;ul-tag ^> RTN @build-module-archive ( name* -- name* ) ( stash depth ) DUP2 GET-DEPTH STH ( start after ) DUP2 ;slen JSR2 ++ INC2 &while ( stop at sibling ) LDAk ;chex JSR2 STHkr = ,&end JCN ( when depth+1 ) LDAk ;chex JSR2 STHkr INC NEQ ,&continue JCN 2++ ;build-page-body JSR2 &continue ( move to eol ) 2++ &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN &end POP2 POPr RTN @build-module-event ( diary* -- ) ( event date ) ( clip bound ) DUP2 #0005 ++ STH2 ( clip start ) #00 STH2kr STA ( clip wrap ) ;code-tag ^<> ( clip restore ) [ LIT '+ ] STH2r STA ( event spacer ) [ LIT 20 ] ^' ;mdash-entity-txt ^" [ LIT 20 ] ^' ( event name ) DUP2 #09 ;next-char JSR2 INC2 #09 ;next-char JSR2 INC2 ^" RTN @build-module-photo ( diary* -- ) ( html ) ;figure-tag ^< ( clip ) DUP2 #0009 ++ STH2 #00 STH2r STA [ LIT '< ] ^' ;img-tag ^" [ LIT 20 ] ^' ;src-attr ^" [ LIT '= ] ^' [ LIT '" ] ^' ;diary-path ^" DUP2 #0006 ++ ^" ;jpg-ext ^" [ LIT '" ] ^' [ LIT '/ ] ^' [ LIT '> ] ^' ( unclip ) DUP2 #0009 ++ STH2 #09 STH2r STA ;figcaption-tag ^< DUP2 #000a ++ ;term/name SWP2 ;scmp-seg JSR2 ,&skip JCN DUP2 ;extract-term JSR2 ;add-local JSR2 [ LIT 20 ] ^' ;mdash-entity-txt ^" [ LIT 20 ] ^' &skip #09 ;next-char JSR2 INC2 #09 ;next-char JSR2 INC2 ^" ;figcaption-tag ^> ;figure-tag ^> RTN @extract-term ( diary* -- term* ) #00 ;&buff STA #000a ++ ( clip bound ) DUP2 #09 ;next-char JSR2 STH2 ( clip start ) #00 STH2kr STA ( clip wrap ) ;&buff ;scat JSR2 ( clip restore ) #09 STH2r STA ;&buff RTN &buff $16 @build-page-footer ( name* -- name* ) ;meta-footer-path .File/name DEO2 #0300 .File/length DEO2 .head LDZ2 DUP2 .File/load DEO2 .File/success DEI2 ++ .head STZ2 RTN ( tools ) @find-term ( name* -- term* ) STH2 LEXICON &while ( move to name ) 2++ ( test ) DUP2 STH2kr ;scmp JSR2 ,&end JCN ( move to eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN POP2 #0000 &end POP2r RTN @find-diary ( name* -- diary* ) STH2 ;diary-path-pages/end ;diary-path-pages &loop LDA2k ;load/diary JSR2 STH2kr ,&search JSR DUP2 #0000 == ,&continue JCN ( found ) NIP2 NIP2 POP2r RTN &continue POP2 INC2 INC2 GTH2k ,&loop JCN POP2 POP2 POP2r #0000 RTN &search ( name* -- diary* ) STH2 DIARY &while ( skip events ) DUP2 ;no-picture ;log-has-picture JSR2 ,&skip JCN ( host is term ) DUP2 STH2kr ;log-has-term JSR2 #01 ! ,&skip JCN POP2r RTN &skip ( move to eol ) &eol INC2 LDAk ,&eol JCN INC2 LDAk ,&while JCN POP2 #0000 POP2r RTN @find-parent ( term* -- parent* ) GET-DEPTH ,¬-root JCN RTN ¬-root REWIND ( stash depth ) LDAk ;chex JSR2 #01 - STH LEXICON SWP2 &loop 1-- #00 ;prev-char JSR2 INC2k LDA ;chex JSR2 STHkr ! ,&continue JCN NIP2 POPr #0003 ++ RTN &continue LTH2k ,&loop JCN ( pop depth ) POPr #0002 RTN @log-has-picture ( log* picture* -- flag ) STH2 #0006 ++ ( clip bound ) DUP2 #0003 ++ STH2 [ #00 ] STH2kr STA SWP2r STH2r ;scmp JSR2 ( clip restore ) [ #09 ] STH2r STA RTN @log-has-term ( log* term* -- flag ) STH2 #000a ++ ( clip bounds ) DUP2 #09 ;next-char JSR2 STH2 [ #00 ] STH2kr STA SWP2r STH2r ;scmp JSR2 ( clip restore ) [ #09 ] STH2r STA RTN @validate-output ( page* -- ) ( look for redlinks ) &while DUP2 ;href-attr SWP2 ;scmp-seg JSR2 #00 = ,&continue JCN ( move to href ) #0006 ++ ( strip relative ) LDAk [ LIT '. ] = ,&continue JCN ( strip jumps ) LDAk [ LIT '# ] = ,&continue JCN ( strip http* ) DUP2 ;http-txt SWP2 ;scmp-seg JSR2 ,&continue JCN ( filter ) DUP2 ;&buff #0030 ;mcpy JSR2 ;&buff [ LIT '. ] #00 ;cswp JSR2 ;&buff [ LIT '_ ] #20 ;cswp JSR2 ( find term ) ;&buff ;find-term JSR2 #0000 !! ,&continue JCN ;&buff ;error-broken-link ERROR &continue INC2 LDAk ,&while JCN POP2 RTN &buff $30 ( Web framework ) @add-a-tag ( path* -- ) [ LIT '< ] ^' [ LIT 'a ] ^' ;href-attr ;add-attr JSR2 [ LIT '> ] ^' RTN @add-img-tag ( src* alt* -- ) STH2 STH2 [ LIT '< ] ^' ;img-tag ^" STH2r ;src-attr ;add-attr JSR2 STH2r ;alt-attr ;add-attr JSR2 [ LIT '/ ] ^' [ LIT '> ] ^' RTN @add-meta-tag ( name* value* -- ) [ LIT '< ] ^' ;meta-tag ^" SWP2 ;add-attr JSR2 [ LIT '/ ] ^' [ LIT '> ] ^' RTN @add-link-tag ( rel* type* href* -- ) [ LIT '< ] ^' ;link-tag ^" ;href-attr ;add-attr JSR2 ;type-attr ;add-attr JSR2 ;rel-attr ;add-attr JSR2 [ LIT '/ ] ^' [ LIT '> ] ^' RTN @add-attr ( body* attr* -- ) [ LIT 20 ] ^' ^" [ LIT '= ] ^' [ LIT '" ] ^' ^" [ LIT '" ] ^' RTN @add-local ( name* -- ) [ LIT '< ] ^' [ LIT 'a ] ^' [ LIT 20 ] ^' ;href-attr ^" [ LIT '= ] ^' [ LIT '" ] ^' STH2k ;add-filename JSR2 [ LIT '" ] ^' [ LIT '> ] ^' STH2r ^" ;a-tag ^> RTN @add-filename ( name* -- ) DUP2 #20 [ LIT '_ ] ;cswp JSR2 ^" DUP2 [ LIT '_ ] #20 ;cswp JSR2 ;html-ext ^" RTN ( generics ) @prev-char ( addr* char -- addr* ) STH &while LDAk STHkr = ,&end JCN LDAk #00 = ,&end JCN 1-- LDAk ,&while JCN &end POPr RTN @next-char ( addr* char -- addr* ) STH &while LDAk STHkr = ,&end JCN LDAk #00 = ,&end JCN INC2 LDAk ,&while JCN &end POPr RTN @has-char ( addr* char -- flag ) STH &while LDAk STHkr ! ,&continue JCN POP2 POPr #01 RTN &continue INC2 LDAk ,&while JCN POP2 POPr #00 RTN ( helpers ) @cswp ( string* a b -- ) STH STH &while LDAk STHkr NEQ ,&continue JCN DUP2 OVRr STHr ROT ROT STA &continue INC2 LDAk ,&while JCN POP2 POP2r RTN @chex ( char -- hex ) DUPk #2f GTH SWP #3a LTH #0101 == ,&num JCN DUPk #40 GTH SWP #47 LTH #0101 == ,&uca JCN DUPk #60 GTH SWP #67 LTH #0101 == ,&lca JCN POP #00 RTN &num ( char -- hex ) LIT '0 - RTN &uca ( char -- hex ) LIT 'A - #0a + RTN &lca ( char -- hex ) LIT 'a - #0a + RTN RTN @scmp ( a* b* -- flag ) STH2 &loop LDAk LDAkr STHr = ,¬-diff JCN POP2 POP2r #00 RTN ¬-diff LDAk LDAkr STHr #0000 !! ,¬-end JCN POP2 POP2r #01 RTN ¬-end INC2 INC2r ,&loop JMP POP2 POP2r #00 RTN @scmp-seg ( a* b* -- flag ) STH2 &loop LDAk LDAkr STHr = ,¬-diff JCN POP2 POP2r #00 RTN ¬-diff INC2k LDA #00 ! ,&continue JCN POP2 POP2r #01 RTN &continue INC2 INC2r ,&loop JMP POP2 POP2r #00 RTN @scat ( src* dst* -- ) DUP2 ,slen JSR ++ ,scpy JSR RTN @scpy ( src* dst* -- ) STH2 DUP2 &while SWP2k -- STH2kr ++ STH2 LDAk STH2r STA INC2 LDAk ,&while JCN SWP2 -- STH2r ++ #00 ROT ROT STA RTN @slen ( addr* -- length* ) 1-- DUP2 &while INC2 LDAk ,&while JCN SWP2 -- 1-- RTN @mclr ( addr* length* -- ) OVR2 ++ SWP2 &loop DUP2 #00 ROT ROT STA INC2 GTH2k ,&loop JCN POP2 POP2 RTN @mcpy ( a* b* length* -- ) STH2 ,&b STR2 ,&a STR2 STH2r #0000 &loop STH2k ,&a LDR2 STH2kr ++ LDA ,&b LDR2 STH2r ++ STA INC2 GTH2k ,&loop JCN POP2 POP2 RTN &a $2 &b $2 @write ( addr* -- ) LDAk #00 = ,&end JCN &while LDAk ,&char JSR INC2 LDAk ,&while JCN &end POP2 RTN &char ( char -- ) .head LDZ2 STA .head LDZ2k INC2 ROT STZ2 RTN @print-hex ( value* -- ) &short ( value* -- ) SWP ,&echo JSR &byte ( value -- ) ,&echo JSR RTN &echo ( value -- ) STHk #04 SFT ,&parse JSR EMIT STHr #0f AND ,&parse JSR EMIT RTN &parse ( value -- char ) DUP #09 GTH ,&above JCN #30 + RTN &above #09 - #60 + RTN RTN @print-string ( addr* -- ) 1-- &while INC2 LDAk [ DUP EMIT ] ,&while JCN POP2 RTN @print-arvelie ( -- ) .DateTime/year DEI2 #07d6 -- NIP ( digit1 ) DUP #0a DIV #30 + EMIT ( digit2 ) #0a MOD #30 + EMIT .DateTime/doty DEI2 ( month ) DUP2 #000e DIV2 NIP #41 + EMIT ( digit3 ) #000e MOD2 DUP2 #000a DIV2 NIP #30 + EMIT ( digit4 ) #000a MOD2 NIP #30 + EMIT #0a EMIT RTN @html-ext ".html $1 @htm-ext ".htm $1 @jpg-ext ".jpg $1 @doctype " $1 @html-tag "html $1 @head-tag "head $1 @meta-tag "meta $1 @link-tag "link $1 @title-tag "title $1 @body-tag "body $1 @header-tag "header $1 @nav-tag "nav $1 @main-tag "main $1 @ul-tag "ul $1 @li-tag "li $1 @a-tag "a $1 @img-tag "img $1 @code-tag "code $1 @figure-tag "figure $1 @figcaption-tag "figcaption $1 @charset-attr "charset $1 @src-attr "src $1 @alt-attr "alt $1 @href-attr "href $1 @rel-attr "rel $1 @type-attr "type $1 @class-attr "class $1 @charset-txt "utf-8 $1 @title-txt "XXIIVV $1 @stylesheet-txt "stylesheet $1 @shortcuticon-txt "shortcut 20 "icon $1 @mdash-entity-txt "— $1 @http-txt "http $1 @index-txt "index $1 @calendar-txt "calendar $1 @journal-txt "journal $1 @self-txt "self $1 @parent-txt "parent $1 @lexicon-path "database/lexicon $1 @diary-path-page3 "database/diary3 $1 @diary-path-page2 "database/diary2 $1 @diary-path-page1 "database/diary1 $1 @diary-path-page0 "database/diary0 $1 @input-path "content/ $1 @output-path "../site/ $1 @diary-path "../media/diary/ $1 @home-path "home.html $1 @meta-footer-path "content/meta_footer.htm $1 @stylesheet-path "../links/main.css $1 @logo-path "../media/icon/logo.svg $1 @shortcuticon-path "../media/services/icon.png $1 @no-picture "000 $1 @error-include-size "--include_size_exceeded $1 @error-include-missing "include_missing $1 @error-broken-link "--redlink $1 @error-term-name-size "--term_name_size_exceeded $1 @error-output-size "--output_size_exceeded $1 @error-term-name-unknown "--term_name_unknown $1 @error-diary-name-length "--diary_name_size_exceeded $1 @stylesheet-type "text/css $1 @shortcuticon-type "image/png $1 @diary-path-pages :diary-path-page3 :diary-path-page2 :diary-path-page1 :diary-path-page0 &end |1800