emu48-mirror/Emu48asc/EMU48ASC.SRC
2024-03-19 22:37:54 +01:00

54 lines
No EOL
2 KiB
Text

%%HP: T(3)A(D)F(.);
C$ $
::
CK1NoBlame ( one argument, attribute errors correctly )
CK&DISPATCH1 ( one argument... )
THREE ( ...check if it's a string )
::
DUP ( duplicate string )
ELEVEN ( last character + 1 to pull out )
1_#1-SUB$ ( pull out string of first characters )
$ "%%HP:" ( test string )
ONE ( search from first position )
POS$ ( find position of test string )
DUP ( duplicate position )
#0=?SKIP ( if header doesn't exist, skip secondary )
::
#5+ ( skip "%%HP:" header )
LAST$ ( pull out the rest of the string on level three )
DUP ( duplicate string )
$ ";" ( substring to find )
ONE ( search from first position )
POS$ ( find position of substring )
2DUP ( duplicate string and position )
#1+ ( add one to bint...this is first char to take )
LAST$ ( pull out the rest of the string on level three )
UNROT ( 3 2 1 -> 1 3 2 )
1_#1-SUB$ ( take out the Kermit header at given position )
PTR 30477 ( set settings based on header [unsupported] )
;
DROP ( garbage...we don't need this )
KINVISLF ( translate, remove all CR's; we just need LF's )
DROP ( drop empty string )
palparse ( get object from string, returns true or false )
NOTcase2DROP ( if conversation fail drop two objects and quit )
DUP ( duplicate object/composite )
CARCOMP ( return first object of the composite )
' xSILENT' ( put object xSILENT' on the stack )
EQ ( compare them )
NOT?SEMI ( if false skip to end of secondary... )
TWO ( get 2nd... )
NTHCOMPDROP ( ...object behind the xSILENT' )
;
ZERO ( ...check if it's not a string [actually, anything] )
::
EDITDECOMP$ ( make into string )
KVISLF ( translations, add a CR to each LF for Windows/DOS )
$ "%%HP:" ( Kermit pre-header )
PTR 303AC ( retrieve current settings [unsupported] )
!append$ ( combine strings, use little memory )
$ ";\\r\\n" ( semicolon, CR, LF )
!append$SWAP ( combine strings, use little memory, swap )
!append$ ( combine strings, use little memory )
;
;