From 3f2114171f63bd05c8be64ebe43151c2a00680d8 Mon Sep 17 00:00:00 2001 From: Ross Wilson Date: Sun, 13 Mar 2016 11:11:33 +0700 Subject: [PATCH] Added new file and README --- boot_block/README | 11 +++++++++ boot_block/bootstrap_tty.asm | 46 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 boot_block/README create mode 100644 boot_block/bootstrap_tty.asm diff --git a/boot_block/README b/boot_block/README new file mode 100644 index 0000000..cd5573a --- /dev/null +++ b/boot_block/README @@ -0,0 +1,11 @@ +The files here are 'production' versions of system code: + +bootstrap_tty.asm + The TTY bootstrap ROM code created from the data in file + images/imlacdocs/loading.pdf. + +blockloader_c8lds_ptr_tty.asm + The blockloader for c8lds format files found in iasm/chars.ptp. + +blockloader_lc16sd_tty.asm + The blockloader for lc16sd format files found in bin/munch.ptp. diff --git a/boot_block/bootstrap_tty.asm b/boot_block/bootstrap_tty.asm new file mode 100644 index 0000000..6fd578c --- /dev/null +++ b/boot_block/bootstrap_tty.asm @@ -0,0 +1,46 @@ +;------------------------ +; TTY bootstrap code from images/imlacdocs/loading.pdf +;------------------------ + ; +bladdr equ 037700 ; address of top mem minus 0100 +blsize equ 0100 ; size of blockloader code + ; + ORG 040 ; + ; + LAC staddr ; + DAC 010 ; 010 points to loading word + LWC blsize-2; + DAC 020 ; 020 is ISZ counter of loader size +; skip all bytes until the expected byte +skpzer RCF ; + CAL ; + RSF ; wait for next byte + JMP .-1 ; + RRB ; get next TTY byte + SAM fbyte ; wait until it's the expected byte + JMP skpzer ; +nxtwrd RSF ; wait until TTY byte ready + JMP .-1 ; + RRC ; get high byte and clear flag + RAL 3 ; shift into AC high byte + RAL 3 ; + RAL 2 ; + RSF ; wait until next TTY byte + JMP .-1 ; + RRC ; get low byte and clear flag + DAC *010 ; store word + CAL ; clear AC ready for next word + ISZ 020 ; finished? + JMP nxtwrd ; jump if not + JMP *blstrt ; else execute the blockloader + ; + DATA 000000 ; empty space? + DATA 000000 ; + DATA 000000 ; + DATA 000000 ; + ; +fbyte DATA 000002 ; expected first byte of block loader +blstrt data bladdr ; start of blockloader code +staddr data bladdr-1; ISZ counter for blockloader size + ; + END ;