8BML (8-bit Markup Language) v1

Updated: 2018-10-08

In the public domain. A markup language suitable for slow memory constrained 8-bit computers with PHP tools to aid in the creation of websites that can render both standard HTML and 8BML.

LINKS

8BML Example Page...8BML Parser in JavaScript POC...
REFERENCE

Notes
8BML commands have comma separated parameters. The commands themselves are separated by a colon.
A page should be a continuous stream of characters with no unnecessary whitespace or carriage returns.
Double Quotes contained within a value should be preceeded with a \.
If you use the PHP utils available within this site to generate pages that are both HTML/8BML compatible it will handle the escapting transparently.
To fetch an 8BML-enabled page in 8BML, the URL should be provided with the '8bml' URL parameter, e.g. 8bml.php?8bml=
To check the resulting size of an 8BML-enabled page, the URL should be provided with the 'rendersize' URL parameter, e.g. 8bml.php?8bml=&rendersize=
Valid Image Format IDs: 1=jpg, 2=png, 3=gif, 4=Amstrad CPC.
Valid Music Format IDs: 1=Amstrad CPC.

Below is a reference to the 8BML commands.

Command Summary: -.<>bdhilmnpstvwxyz

-"<markup version>","<page title>"

Start of Page

<markup version> = the version of the markup, will only change if future version become non-backward compatible. 8BML browsers should be hardcoded to support the returned version only.

<page title> = the title of the current page.

.

End of Page

<

Go back to previous page.

>"<url>","<text>","<url>","<text>","<url>","<text>","<url>","<text>","<url>","<text>","<url>","<text>","<url>","<text>","<url>","<text>","<url>","<text>","<url>","<text>"

Display a row of up to 10 links toolbar style.

b"<text>"

Bold Text

<text> = bold text.

d"<url>","<text>"

Download Link

<url> = a URL to the resource to download.

<text> = a text description of the resource to download.

h

Horizontal Line

i"<image format>","<url>","<text>","<width>","<height>"

Image

<image format> = the format id of the image.

<url> = a URL to the image.

<text> = a text description of the image.

<width> = the width of the image.

<height> = the height of the image.

l"<url>","<text>","<flags>"

Linked Page

<url> = a URL to a page.

<flags> = t to open in a new tab, l to left justify, r to right justify.

<text> = a text description of the linked page.

m"<music format>","<url>"

Music

<music format> = the format id of the music.

<url> = a url to the music to play.

n

Newline

p"<text>"

Page Heading

<text> = a page heading.

s"<text>"

A Sub Heading

<text> = a sub heading.

t"<text>"

Page Text

<text> = standard page text.

v"<columncount>","<text>","","<text>","","<url>","<text>","<url>","<text>"

Display a row of up to 10 columns in a table, the headings have 2 parameter per column, the rows 2 parameters per column. The second column for headings is an optional type value of 'actions'. If the heading is of this type, then multiple actions/URLs can be separated in the row of that column by a pipe '|' character.

w"<name>","<value>","<flags>","<code>","<text>","<code>","<text>"...

A Form Select Which Field

<name> = the name of the form select field.

<value> = a value to populate the form text field with.

<flags> = 'm' for mandatory.

<code> = a code that represents an that is submitted with the form.

<text> = the text of an option visible to the user.

...

x"<url>","<action>"

Submit a form

<url> = the url where to submit the form to.

<action> = the action to submit.

y"<name>","<length>","<flags>","<value>"

A Form Text Field

<name> = the name of the form text field.

<length> = the maximum length allowable within the form text field.

<flags> = 'm' for mandatory. 'p' for password.

<value> = a value to populate the form text field with.

z"<name>","<cols>","<rows>","<flags>","<value>"

A Form Textarea Field

<name> = the name of the form textarea field.

<cols> = the number of columns for the textarea field.

<rows> = the number of rows for the textarea field.

<flags> = 'm' for mandatory.

<value> = a value to populate the form textarea field with.