vipsi - the friendly vip script interpreter

Example Scripts

CGI Scripts

Online Z80 Assembler

One of my other projects is Flow control: if … then
Flow control: try … then
the
Z80 assembler zasm, a command line tool for Unix-style operating systems. For some nice people, which use other OS'es, i have set up an online interface to Flow control: if … then
Flow control: try … then
the
assembler. List functions: thisThis is Flow control: if … then
Flow control: try … then
the
Modes of Operation: CGI Scripts
Example Scripts: CGI Scripts
cgi script
for that.

Download link

zasm.cgi

Test link

/cgi-bin/zasm.cgi

Listing

#!/home/smile77/bin/vipsi


/* --------------------------------------------------------------------------------------------
            ONLINE ZASM Z80 ASSEMBLER
-------------------------------------------------------------------------------------------- */

Syntax Cave-ats: var argc = count globals - 1var argc = count globals -1     // for Instructions: procproc ShowCommandLineArguments()



/*  zasm.cgi                            => show main page w/ Text functions: info
Shell Immediate Commands: info
info
zasm.cgi?what="assemble"&src={..} => assemble, show main page w/ Text functions: link
Instructions: link
links
to results zasm.cgi?what="sdjhgsadfg.Numeric functions: log
Numeric functions: loge
Instructions: log
log
" => send named Text functions: file
Instructions: file
file
(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
) == assembler Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
zasm.cgi?what="sdjhgsadfg.bin" => send named Text functions: file
Instructions: file
file
(bina) == assembler output zasm.cgi?what="sdjhgsadfg.rom" => send named Text functions: file
Instructions: file
file
(bina) == assembler output zasm.cgi?what="sdjhgsadfg.tap" => send named Text functions: file
Instructions: file
file
(bina) == assembler output zasm.cgi?what="sdjhgsadfg.z80" => send named Text functions: file
Instructions: file
file
(bina) == assembler output */ Flow control: if … thenif !Numeric functions: existsexists what Instructions: var
How does VScript::Value() work?: Var*&
var
what = "main page" Flow control: if … then
Flow control: try … then
then
// "main page", "assemble", <filename> // ---- sanity check & enforce existance of form data ---- Flow control: if … thenif !Numeric functions: existsexists Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
Instructions: var
How does VScript::Value() work?: Var*&
var
Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
= "" Flow control: if … then
Flow control: try … then
then
// "", "-1", "-2" Flow control: if … thenif !Numeric functions: existsexists verbose Instructions: var
How does VScript::Value() work?: Var*&
var
verbose = "" Flow control: if … then
Flow control: try … then
then
// "", "-v" Flow control: if … thenif !Numeric functions: existsexists labels Instructions: var
How does VScript::Value() work?: Var*&
var
labels = "" Flow control: if … then
Flow control: try … then
then
// "", "-w" Flow control: if … thenif !Numeric functions: existsexists encoding Instructions: var
How does VScript::Value() work?: Var*&
var
encoding= "-b" Flow control: if … then
Flow control: try … then
then
// "-b", "-x" Flow control: if … thenif Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
=="" && labels!="" Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
="-2" Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
=="" && verbose!="" Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
="-2" Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif !Numeric functions: existsexists src.filename || !Numeric functions: existsexists src.data Instructions: var
How does VScript::Value() work?: Var*&
var
src = { filename="", data="" } Flow control: if … then
Flow control: try … then
then
// source Text functions: file
Instructions: file
file
Flow control: if … thenif !Numeric functions: existsexists inc.filename || !Numeric functions: existsexists inc.data Instructions: var
How does VScript::Value() work?: Var*&
var
inc = { filename="", data="" } Flow control: if … then
Flow control: try … then
then
// optional Functions with varying return types: include
Instructions: include
include
Text functions: file
Instructions: file
file
Flow control: if … thenif Numeric functions: existsexists List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
"/pub/www/tmp/zasm/" // eden@home Instructions: cd
Shell Immediate Commands: cd
cd
"/pub/www/tmp/zasm/" Instructions: var
How does VScript::Value() work?: Var*&
var
tempdir = "./" Instructions: var
How does VScript::Value() work?: Var*&
var
htmltempdir = "/www/tmp/zasm/" Instructions: var
How does VScript::Value() work?: Var*&
var
zasm = "/usr/bin/zasm" Instructions: var
How does VScript::Value() work?: Var*&
var
htmlbdir = "/www/b/" Flow control: if … then
Flow control: try … then
else
// little-bat Instructions: cd
Shell Immediate Commands: cd
cd
"/home/smile77/htdocs/tmp/zasm/" var tempdir = "./" Instructions: var
How does VScript::Value() work?: Var*&
var
htmltempdir = "/tmp/zasm/" Instructions: var
How does VScript::Value() work?: Var*&
var
zasm = "/home/smile77/bin/zasm" Instructions: var
How does VScript::Value() work?: Var*&
var
htmlbdir = "/b/" Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
email_link = «<a href="mailto:kio@little-bat.de">mailto:kio</a>» Instructions: var
How does VScript::Value() work?: Var*&
var
disclaimer = «<a href="zasm.cgi?what=disclaimer">disclaimer</a>» Instructions: var
How does VScript::Value() work?: Var*&
var
vipsi_link = «powered by <a target="X" href="http://vipsi.sourceforge.net">vipsi</a> - your friendly VIP Example Scripts: CGI Scripts
Example Scripts: Scripts
Script
Interpreter» Instructions: var
How does VScript::Value() work?: Var*&
var
z80_links = «\ <a target="X" href="http://little-bat.de/cpc/">Das Schneider CPC Systembuch</a> &nbsp; <a target="X" href="http://little-bat.de/cpc/Numeric functions: indexindex.html#/cpc/6.3_z80tab.html">Z80 Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
set</a> &nbsp; [German] [little-bat.de]» Instructions: var
How does VScript::Value() work?: Var*&
var
zasm_links = «\ <a target="X" href="http://k1.spdns.de/Develop/projects/zasm/doc/">documentation</a> &nbsp; <a target="X" href="http://k1.spdns.de/Develop/projects/zasm/distributions/">download page</a> &nbsp; [k1.spdns.de] <br> <a target="X" href="http://sourceforge.net/projects/zasm/">zasm project page</a> &nbsp; <a target="X" href="http://sourceforge.net/project/showfiles.php?group_id=53490">download page</a> &nbsp; [sourceforge.net] <br> <a target="X" href="http://little-bat.de">little-bat.de</a> &nbsp; <a target="X" href="http://little-bat.de/prog">download page</a> &nbsp; [little-bat.de] » Instructions: var
How does VScript::Value() work?: Var*&
var
styles = « <style type="Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/css"> /*page body*/ body { font-family:sans-serif; background-image:url(»#htmlbdir#«hdgr.jpg); } /*main title*/ h1 { font-size:20pt; line-height:150%; padding:0pt; margin:0pt; margin-bottom:0.3em; } /*push Text functions: file
Instructions: file
file
form*/ table.pushfile { border:ridge #88cc88; padding:20px; background-color:#ccff99; } /*kleingedrucktes*/ .small { text-align:center; vertical-align:middle; font-size:9pt; } </style> » /* ---- show table of command line Vipsi command syntax: Arguments
Glossary: Arguments
arguments
to Example Scripts: CGI Scripts
Example Scripts: Scripts
script
---------------------------------------- */ Instructions: procproc ShowCommandLineArguments() { Flow control: if … thenif argc==0 // Instructions: putput « // <h4>command line Vipsi command syntax: Arguments
Glossary: Arguments
arguments
</h4> // <p>--none--</p> // » Flow control: returnreturn Flow control: if … then
Flow control: try … then
then
Instructions: putput « <h4>command line Vipsi command syntax: Arguments
Glossary: Arguments
arguments
</h4> <table border width="100%"> <tr> <td width="10%"><b>Numeric functions: indexindex</b></td> <td width="20%"><b>Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
</b></td> <td><b>Glossary: Valuevalue</b></td> </tr> » Instructions: var
How does VScript::Value() work?: Var*&
var
i = 0 Flow control: do … loopdo Flow control: whilewhile ++i<=argc Instructions: var
How does VScript::Value() work?: Var*&
var
gname = Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
List functions: globals
Shell Immediate Commands: globals
globals
[i] Instructions: var
How does VScript::Value() work?: Var*&
var
gdata = List functions: globals
Shell Immediate Commands: globals
globals
[i] Flow control: if … thenif Numeric functions: istextistext(gdata) Text functions: convert
Instructions: convert
convert
gdata to quoted; Flow control: if … then
Flow control: try … then
then
Text functions: convert
Instructions: convert
convert
gdata to html Text functions: convert
Instructions: convert
convert
gname to printable; Text functions: convert
Instructions: convert
convert
gname to html Flow control: if … thenif gname=="" gname = "<i>unnamed</i>" Flow control: if … then
Flow control: try … then
then
Instructions: putput « <tr> <td>List functions: globals
Shell Immediate Commands: globals
globals
[»,i,«]</td> <td>», gname, «</td> <td>», gdata, «</td> </tr> » Flow control: do … looploop Instructions: putput « </table> » } /* ---- show table of environment Glossary: Variable, var_refvariables ----------------------------------- */ Instructions: procproc ShowEnvironmentVariables() { Instructions: putput « <h4>environment Glossary: Variable, var_refvariables</h4> <table border width="100%"> <tr> <td width="10%"><b>Numeric functions: indexindex</b></td> <td width="20%"><b>Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
</b></td> <td><b>Glossary: Valuevalue</b></td> </tr> » // in order to Instructions: sortsort by Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
we Text functions: convert
Instructions: convert
convert
Flow control: if … then
Flow control: try … then
the
named items of List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
// into sub-lists of form { Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
, data } Instructions: var
How does VScript::Value() work?: Var*&
var
env_var = List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
Instructions: var
How does VScript::Value() work?: Var*&
var
i = 0 Flow control: do … loopdo Flow control: whilewhile ++i <= Numeric functions: countcount env_var env_var[i] = { Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
env_var[i], env_var[i] } Flow control: do … looploop Instructions: sortsort env_var // Instructions: sortsort Flow control: if … then
Flow control: try … then
the
Glossary: list_ref, list_varlist var i = 0 Flow control: do … loopdo Flow control: whilewhile ++i <= Numeric functions: countcount env_var Instructions: var
How does VScript::Value() work?: Var*&
var
ename = env_var[i,1] Text functions: convert
Instructions: convert
convert
ename to printable Text functions: convert
Instructions: convert
convert
ename to html Instructions: var
How does VScript::Value() work?: Var*&
var
edata = env_var[i,2] Text functions: convert
Instructions: convert
convert
edata to quoted Text functions: convert
Instructions: convert
convert
edata to html Flow control: if … thenif ename=="" ename = "<i>unnamed</i>" Flow control: if … then
Flow control: try … then
then
Instructions: putput « <tr> <td>List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
[»,i,«]</td> <td>», ename, «</td> <td>», edata, «</td> </tr> » Flow control: do … looploop Instructions: putput « </table> » } /* ---- send push-file form -------------------------------------------------- */ Instructions: procproc ShowPushFileForm() { Instructions: var
How does VScript::Value() work?: Var*&
var
checked0 = Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
=="" ? "checked" : "" Instructions: var
How does VScript::Value() work?: Var*&
var
checked1 = Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
=="-1" ? "checked" : "" Instructions: var
How does VScript::Value() work?: Var*&
var
checked2 = Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
=="-2" ? "checked" : "" Instructions: var
How does VScript::Value() work?: Var*&
var
checkedv = verbose=="" ? "" : "checked" Instructions: var
How does VScript::Value() work?: Var*&
var
checkedw = labels=="" ? "" : "checked" Instructions: var
How does VScript::Value() work?: Var*&
var
checked_e1 = encoding=="-b" ? "checked" : "" Instructions: var
How does VScript::Value() work?: Var*&
var
checked_e2 = encoding=="-x" ? "checked" : "" Instructions: putput « <form action="zasm.cgi" enctype="multipart/form-data" method="post"> <table class="pushfile"> <tr> <td>Source: <td><input type="Text functions: file
Instructions: file
file
" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="src" size="50" maxlength="200000" accept="Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/*"> <td><input type="submit" Glossary: Valuevalue=" Assemble "> <!--input type="reset" Glossary: Valuevalue="Reset form"--> <input type="hidden" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="what" Glossary: Valuevalue="assemble"> </tr> <tr valign=top> <td>Functions with varying return types: include
Instructions: include
Include
:<span style="font-size:66%;"><br>(optional)</span> <td><input type="Text functions: file
Instructions: file
file
" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="inc" size="50" maxlength="200000" accept="Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/*"> <td>&nbsp; </tr> <tr> <td>Output: <td><input type="radio" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="encoding" Glossary: Valuevalue="-b" »#checked_e1#«>Integer numbers: Binary
Floating point: Binary
Text functions: binstr
Binary
<input type="radio" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="encoding" Glossary: Valuevalue="-x" »#checked_e2#«>Intel Text functions: hexstrHex </td> </tr> <tr> <td>Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
Listing
: <td colspan=2><input type="radio" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
" Glossary: Valuevalue="" »#checked0#«>None <input type="radio" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
" Glossary: Valuevalue="-1" »#checked1#«>Pass 1 <input type="radio" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
" Glossary: Valuevalue="-2" »#checked2#«>Pass 2 &nbsp; &nbsp; <input type="checkbox" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="verbose" Glossary: Valuevalue="-v" »#checkedv#«>Functions with varying return types: include
Instructions: include
Include
generated code &nbsp; &nbsp; <input type="checkbox" Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
="labels" Glossary: Valuevalue="-w" »#checkedw#«>Append label Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
</tr> </table> </form> » } /* ---- HEADER -------------------------------------------------- */ Instructions: procproc PutHtmlHeader() { Instructions: putput «content-type: Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/html; charset=utf-8», Constants: nlnl, Constants: nlnl, «<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">», Constants: nlnl, «<html><head><META http-equiv="Content-Type" content="Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
/html; charset=UTF-8">», Constants: nlnl, «<title>zasm - z80 online assembler</title>», Constants: nlnl, styles, Constants: nlnl, «</head><body>», Constants: nlnl, Constants: nlnl // alles-umfassende Tabelle Instructions: putput «<table align="center"><tr><td>», Constants: nlnl Instructions: putput «<h1>zasm - z80 online assembler</h1>», Constants: nlnl } /* ----------- Footer ------------------- */ Instructions: procproc PutHtmlFooter() { Instructions: putput « <table width="100%" style="margin-top:1em; border-top:solid thin; padding-top:0.5em;"> <tr><td class="small">», disclaimer, « &nbsp; », email_link, «<br><br>», z80_links, «<br><br>», zasm_links, «<br><br>», vipsi_link, « </td></tr> </table>» // Flow control: end
Shell Immediate Commands: exit, quit, end
ende
der alles umfassenden tabelle: Instructions: putput Constants: nlnl, «</td></tr></table>», Constants: nlnl Instructions: putput «</body></html>», Constants: nlnl } /* ---- send initial page ---------------------------------------------------- show main page w/ Text functions: info
Shell Immediate Commands: info
info
*/ Flow control: if … thenif what=="main page" PutHtmlHeader() ShowPushFileForm(); Instructions: putput «<p>welcome to Flow control: if … then
Flow control: try … then
the
online version of zasm - Flow control: if … then
Flow control: try … then
the
z80 assembler.</p>», Constants: nlnl // ShowCommandLineArguments(); // ShowEnvironmentVariables(); PutHtmlFooter() Flow control: end
Shell Immediate Commands: exit, quit, end
end
0 Flow control: if … then
Flow control: try … then
then
/* ---- send disclaimer ---------------------------------------------------- show legal stuff */ Flow control: if … thenif what=="disclaimer" PutHtmlHeader() ShowPushFileForm(); Instructions: putput « <table><tr><td> <h4>Copyright</h4> <p>Copyright (c) Günter Woigk 1994-2004<br> <a href="mailto:kio@little-bat.de">kio@little-bat.de</a></p> <h4>No warranties</h4> <p>List functions: thisThis program is free software.</p> <p>List functions: thisThis program is distributed in Flow control: if … then
Flow control: try … then
the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even Flow control: if … then
Flow control: try … then
the
implied warranty of MERCHANTABILITY Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
FITNESS FOR A PARTICULAR PURPOSE.</p> <p>Permission to use, copy, modify, distribute, Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
sell List functions: thisthis software Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
its documentation for any purpose is hereby granted without fee, provided that Flow control: if … then
Flow control: try … then
the
above copyright notice appear in all copies Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
that both that copyright notice Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
List functions: thisthis permission notice appear in supporting documentation, Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
that vipsi - the friendly one.: The namethe name of Flow control: if … then
Flow control: try … then
the
copyright holder Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
be used in advertising Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
publicity pertaining to distribution of Flow control: if … then
Flow control: try … then
the
software without specific, written prior permission. Flow control: if … then
Flow control: try … then
The
copyright holder makes no representations about Flow control: if … then
Flow control: try … then
the
suitability of List functions: thisthis software for any purpose. It is provided "as is" without express Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
implied warranty.</p> <p>Flow control: if … then
Flow control: try … then
THE
COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO List functions: thisTHIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
AND
FITNESS, IN NO EVENT SHALL Flow control: if … then
Flow control: try … then
THE
COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
OR
CONSEQUENTIAL DAMAGES Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
OR
OTHER TORTIOUS ACTION, ARISING OUT OF Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
OR
IN CONNECTION WITH Flow control: if … then
Flow control: try … then
THE
USE Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
OR
PERFORMANCE OF List functions: thisTHIS SOFTWARE.</p> <h4>Non-disclosure agreement</h4> <p>There is no agreement on non-disclosure for any Text functions: file
Instructions: file
files
assembled online.</p> </td></tr></table> », Constants: nlnl PutHtmlFooter() Flow control: end
Shell Immediate Commands: exit, quit, end
end
0 Flow control: if … then
Flow control: try … then
then
/* ---- decode MacBinary --------------- [kio 2004-05-24] $0000 - $0080: viele Nullen "mBIN" und "Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
TEXT
" sollten vorkommen außerdem der Dateiname. naja. am Flow control: end
Shell Immediate Commands: exit, quit, end
Ende
gibts dann auch Gestrüpp, vermutlich die Resource-Fork. */ Instructions: procproc DecodeMacBinary(Filename,Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
) { Flow control: if … thenif !Numeric functions: rfindrfind(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
,Text functions: charstrcharstr(0),$80) Flow control: returnreturn Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
n=0, i=0 Flow control: do … loopdo Flow control: whilewhile ++i<=$80 n += Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
[i]==Text functions: charstrcharstr(0) Flow control: do … looploop n = (n>=$20) + !!Numeric functions: rfindrfind(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
,"mBIN",$80) + !!Numeric functions: rfindrfind(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
,"Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
TEXT
",$80) + !!Numeric functions: rfindrfind(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
,Filename,$80) Flow control: if … thenif n>=3 // crop MacBinary stuff Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
= Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
[$81 Text functions: stringto] Text = Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
[to Numeric functions: findfind(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
,Text functions: charstrcharstr(0))-1] Instructions: var
How does VScript::Value() work?: Var*&
var
e1=Numeric functions: rfindrfind(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
,Text functions: charstrcharstr(13)) Instructions: var
How does VScript::Value() work?: Var*&
var
e2=Numeric functions: rfindrfind(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
,Text functions: charstrcharstr(10)) Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
= Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
[to Numeric functions: maxmax(e1,e2)] Flow control: if … then
Flow control: try … then
then
Flow control: returnreturn Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
Text
} /* ---- assemble --------------------- */ Flow control: if … thenif what=="assemble" Flow control: if … thenif !Numeric functions: existsexists(src.filename) || src.filename=="" || !Numeric functions: existsexists(src.data) || src.data=="" PutHtmlHeader() ShowPushFileForm(); Instructions: putput «<p style="color:red;">Please Operators: Item selector "[]"
Operators: Select "? :"
select
a source Text functions: file
Instructions: file
file
before clicking on [Assemble].</p>», Constants: nlnl // ShowCommandLineArguments(); // ShowEnvironmentVariables(); PutHtmlFooter() Flow control: end
Shell Immediate Commands: exit, quit, end
end
0 Flow control: if … then
Flow control: try … then
else
PutHtmlHeader() ShowPushFileForm(); Instructions: var
How does VScript::Value() work?: Var*&
var
filebasename = src.filename[to Numeric functions: rfindrfind(src.filename,".")-1] Instructions: var
How does VScript::Value() work?: Var*&
var
tempdirlist = List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
(tempdir#filebasename#".*") Instructions: var
How does VScript::Value() work?: Var*&
var
i=0 Flow control: do … loopdo Flow control: whilewhile ++i <= Numeric functions: countcount tempdirlist Instructions: deldel Text functions: file
Instructions: file
file
(tempdir#tempdirlist[i].dir: fnamefname) Flow control: do … looploop Text functions: file
Instructions: file
file
(tempdir#src.filename) = DecodeMacBinary(src.filename,src.data); Flow control: if … thenif inc.filename!="" Text functions: file
Instructions: file
file
(tempdir#inc.filename) = DecodeMacBinary(inc.filename,inc.data); Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
fname_html = src.filename Text functions: convert
Instructions: convert
convert
fname_html to quoted Text functions: convert
Instructions: convert
convert
fname_html to html Instructions: putput «<h4>Assemble »,fname_html,«</h4>», Constants: nlnl Instructions: var
How does VScript::Value() work?: Var*&
var
args = {} Flow control: if … thenif Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
!="" args ##= Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif verbose!="" args ##= verbose Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif labels!="" args ##= labels Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif encoding!="" args ##= encoding Flow control: if … then
Flow control: try … then
then
args ##= { "-i", tempdir#src.filename } Instructions: putput "<pre>" // Flow control: if … then
Flow control: try … then
the
assembler may print some lines Flow control: try … thentry Instructions: var
How does VScript::Value() work?: Var*&
var
output = Text functions: sys
Instructions: sys
sys
( zasm,args ) Flow control: if … then
Flow control: try … then
else
// no need to print error: zasm has already printed it to Constants: stderrstderr Flow control: if … then
Flow control: try … then
then
Text functions: convert
Instructions: convert
convert
output to html Instructions: putput output Instructions: putput "</pre>" Instructions: var
How does VScript::Value() work?: Var*&
var
tempdirlist = List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
(tempdir#filebasename#".*") Instructions: putput «<h4>Your result Text functions: file
Instructions: file
files
</h4>», Constants: nlnl Instructions: putput "<pre> " Instructions: var
How does VScript::Value() work?: Var*&
var
i=0 Flow control: do … loopdo Flow control: whilewhile ++i<=Numeric functions: countcount tempdirlist Instructions: putput «<a href="»,htmltempdir,tempdirlist[i].dir: fnamefname,«">»,tempdirlist[i].dir: fnamefname,«</a> &nbsp; » Flow control: do … looploop Instructions: putput "</pre>" PutHtmlFooter() Flow control: end
Shell Immediate Commands: exit, quit, end
end
0 Flow control: if … then
Flow control: try … then
then
Flow control: if … then
Flow control: try … then
then
/* ---- send result ------------------------------------------------------------ ((Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
used)) */ Instructions: var
How does VScript::Value() work?: Var*&
var
dir: fnamefname = what Instructions: var
How does VScript::Value() work?: Var*&
var
fname_html = dir: fnamefname Text functions: convert
Instructions: convert
convert
fname_html to printable Text functions: convert
Instructions: convert
convert
fname_html to html Flow control: if … thenif !Numeric functions: existsexists Text functions: file
Instructions: file
file
dir: fnamefname PutHtmlHeader() ShowPushFileForm(); Instructions: putput «<p>Flow control: if … then
Flow control: try … then
the
requested result Text functions: file
Instructions: file
file
"»,fname_html,«" was Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
found.</p>», Constants: nlnl ShowCommandLineArguments(); ShowEnvironmentVariables(); PutHtmlFooter() Flow control: end
Shell Immediate Commands: exit, quit, end
end
0 Flow control: if … then
Flow control: try … then
else
PutHtmlHeader() ShowPushFileForm(); Instructions: putput «<p>Flow control: if … then
Flow control: try … then
the
requested result Text functions: file
Instructions: file
file
"»,fname_html,«" is present.</p>», Constants: nlnl ShowCommandLineArguments(); ShowEnvironmentVariables(); PutHtmlFooter() Flow control: end
Shell Immediate Commands: exit, quit, end
end
0 Flow control: if … then
Flow control: try … then
then

Valid HTML   Valid CSS