Classic Computing

 

 

Molecular 18 Assembler

All the time I worked on these machines, I always hankered after an assembler.  Those older and wiser than me always reckoned you could do much better in your head, but I came from an 8080 and Z80 background where an assembler was standard.

So a days effort, and lo - a molly assembler

Sample source code

/Puts title, prompts for user name, replies and starts again
/Escape at user name to quit to OS
/
/entry point at 10
/
*10
START,  JSBR IZ 1625    /PUT TITLE
	P       TITLE
	JSBR IZ 1640    /GET USER_NAME - ESC TO OS
	P       GNAME
	JSBR IZ 1625    /PUT 'HELLO'
	P       HELLO
	JSBR IZ 1625    /PUT USER'S NAME
	P       NAME
	JUMP    START
/TEXT STRINGS
TITLE,  TEXT    'MOLLY 18 DEMO'
PROMPT, TEXT    'USER NAME ? '
HELLO,  TEXT    'HELLO '
/GET BLOCKS
GNAME,  1402
	224010
	P       PROMPT
	P       NAME
/VARIABLE SPACE
NAME,   SPACE   10      /SPACE FOR 10 CHAR USER NAME
SPARE,  0
$

Assembler Output

   1            /Puts title, prompts for user name, replies and starts again
   2            /Escape at user name to quit to OS
   3            /
   4            /entry point at 10
   5            /
   6            *10
   7 000010 037625	START,  JSBR IZ 1625    /PUT TITLE
   8 000011 200021		P       TITLE
   9 000012 037640		JSBR IZ 1640    /GET USER_NAME - ESC TO OS
  10 000013 200043		P       GNAME
  11 000014 037625		JSBR IZ 1625    /PUT 'HELLO'
  12 000015 200037		P       HELLO
  13 000016 037625		JSBR IZ 1625    /PUT USER'S NAME
  14 000017 200047		P       NAME
  15 000020 020010		JUMP    START
  16            /TEXT STRINGS
  17 000021 046517	TITLE,  TEXT    'MOLLY 18 DEMO'
  17 000022 046114 
  17 000023 054440 
  17 000024 030470 
  17 000025 020104 
  17 000026 042515 
  17 000027 023600 
  18 000030 052523	PROMPT, TEXT    'USER NAME ? '
  18 000031 042522 
  18 000032 020116 
  18 000033 040515 
  18 000034 042440 
  18 000035 037440 
  18 000036 000000 
  19 000037 044105	HELLO,  TEXT    'HELLO '
  19 000040 046114 
  19 000041 047440 
  19 000042 000000 
  20            /GET BLOCKS
  21 000043 001402	GNAME,  1402
  22 000044 224010		224010
  23 000045 200030		P       PROMPT
  24 000046 200047		P       NAME
  25            /VARIABLE SPACE
  26 000047 000000	NAME,   SPACE   10      /SPACE FOR 10 CHARACTER USER NAME
  26 000050 000000 
  26 000051 000000 
  26 000052 000000 
  26 000053 000000 
  26 000054 000000 
  26 000055 000000 
  26 000056 000000 
  27 000057 000000	SPARE,  0
  28            $

 

(C) Kevin Murrell, January 2000