DAVIAC-web/hillbilly1.php

156 lines
3.4 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<title>DAVIAC: A relay computer</title>
<link rel="stylesheet" href="style.css" type="text/css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="background">
<div class="grid-container">
<?php include("header.php"); ?>
<?php include("sidebar.php"); ?>
<div id="main-text" class="main">
<h2> The Hillibilly1 Assembler </h2>
<p> The DOS binary and potentially source code will be provided at a later date </p>
<p> The program's <a href="/hillbilly1/Hillbilly1.txt">help output</a> provides some usage info and the assembler -> machine code mappings reproduced here: </p>
<pre>
Relay Computer Assembler: Ver. Beta 0.4.3
Valid assembler codes:
ADD : 22 00100010
AND : 26 00100110
BRA : 60 01100000
BRN : 48 01001000
BRNN : 54 01010100
BRNO : 5c 01011100
BRNP : 50 01010000
BRNZ : 4c 01001100
BRO : 58 01011000
BRP : 44 01000100
BRZ : 40 01000000
DEF :
EQU :
HALT : 08 00001000
INCB,A : 2c 00101100
INCB,C : 2e 00101110
LDAA : a0 10100000
LDAB : a1 10100001
LDAC : a2 10100010
LDDA : a8 10101000
LDDB : a9 10101001
LDDC : aa 10101010
LDIA : 98 10011000
LDIB : 99 10011001
LDIC : 9a 10011010
MOVA,B : c1 11000001
MOVA,C : c2 11000010
MOVA,MH : c3 11000011
MOVA,ML : c4 11000100
MOVAD+,PC: ec 11101100
MOVB,A : c8 11001000
MOVB,C : ca 11001010
MOVB,MH : cb 11001011
MOVB,ML : cc 11001100
MOVC,A : d0 11010000
MOVC,B : d1 11010001
MOVC,MH : d3 11010011
MOVC,ML : d4 11010100
MOVM,PC : de 11011110
MOVPC,AD+: f5 11110101
MOVZ,A : f8 11111000
MOVZ,B : f9 11111001
MOVZ,C : fa 11111010
MOVZ,MH : fb 11111011
MOVZ,ML : fc 11111100
NOP : 00 00000000
NOTA,B : 29 00101001
NOTA,C : 2a 00101010
ORG :
RESET : 04 00000100
ROLB,A : 34 00110100
ROLB,C : 36 00110110
RORA,B : 31 00110001
RORA,C : 32 00110010
STAA : 84 10000100
STAB : 8c 10001100
STAC : 94 10010100
STAZ : bc 10111100
STDA : 85 10000101
STDB : 8d 10001101
STDC : 95 10010101
WAIT : 0c 00001100
\ :
</pre>
<p> <a href="/hillbilly1/ADD16.asm">Here</a> is an example 16 bit adder program for the DAVIAC-1:</p>
<pre>
\ RAM Variables
ORG 0800H \RAM at 0800h
DEF X_Lo *1
DEF X_Hi *1
DEF Y_Lo *1
DEF Y_Hi *1
DEF Z_Lo *1
DEF Z_Hi *1
DEF Carry_Lo *1
DEF Carry_Hi *1
ORG 0400h
\
\ load some numbers
\
\ Put numbers in X and Y at 0800H by hand from Control Panel.
\
\
\ 16bit ADD X + Y -> Z + Carry_Hi
\
\
NOP
ADD16:
WAIT
STAZ Carry_Lo \Clear lo carry
LDAA X_Lo
LDAB Y_Lo
ADD \ADD lo bytes
STAC Z_Lo \store partial sum
BRNO ADD16J1: \test OVF bit to see if Carry required
LDIA 01h \must be OVF, set a Carry_Lo
STAA Carry_Lo
ADD16J1:
STAZ Carry_Hi \Clear hi carry
LDAA X_Hi
LDAB Y_Hi
ADD \ADD hi bytes
STAC Z_Hi \store hi partial sum
BRNO ADD16J2:
LDAA 01h \might be a hi carry
STAA Carry_Hi
ADD16J2:
MOVC,A
LDAB Carry_Lo \include any lo carry
ADD
STAC Z_Hi
BRNO ADD16J3:
LDAA 01h
STAA Carry_Hi \which may trigger a hi carry
ADD16J3:
\
BRA ADD16:
\
\ end of ADD16p
</pre>
<p> The Assembler produces the <a href="/hillbilly1/ADD16.hex">Hex</a> and a <a href="/hillbilly1/ADD16.lst">run list</a>.
</div>
<?php include("footer.php"); ?>
</div>
</div>
</body>
</html>