From d8d550d013733162ab4c8efb8300e42899ac50f1 Mon Sep 17 00:00:00 2001 From: Noelle Leigh Date: Sun, 24 Sep 2023 11:14:16 -0400 Subject: [PATCH] 45: WIP --- .../README.md | 10 +++++++ .../XA.exa | 27 +++++++++++++++++++ README.md | 1 + 3 files changed, 38 insertions(+) create mode 100644 45-nettronics-net40-modem-the-wardialer/README.md create mode 100644 45-nettronics-net40-modem-the-wardialer/XA.exa diff --git a/45-nettronics-net40-modem-the-wardialer/README.md b/45-nettronics-net40-modem-the-wardialer/README.md new file mode 100644 index 0000000..062d00b --- /dev/null +++ b/45-nettronics-net40-modem-the-wardialer/README.md @@ -0,0 +1,10 @@ +# NETronics NET40 Modem: The Wardialer + +## Stuff we know + +- Phone numbers are 11 digits long. +- There can be 1 to 3 `X` placeholders in the starting number. +- Phone number digits are never negative. +- We can tell if a value is a number by testing if the value is `< 10` or `> -1`. Numbers will be true, but `X` will be false. +- We can tell if our modem is connected if reading from `#DIAL` returns 1. If the connection was refusedm it will return 0. +- We cannot optimistically write all possible numbers to file 301 because the file would be too large. diff --git a/45-nettronics-net40-modem-the-wardialer/XA.exa b/45-nettronics-net40-modem-the-wardialer/XA.exa new file mode 100644 index 0000000..b2ff7c8 --- /dev/null +++ b/45-nettronics-net40-modem-the-wardialer/XA.exa @@ -0,0 +1,27 @@ +; BASIC DIAL AND CHECK +GRAB 300 +LINK 800 + +MARK READDIGIT +COPY F X +TEST X < 10 +FJMP REPLACE +COPY X #DIAL +JUMP CHECKEOF + +MARK REPLACE +COPY 0 #DIAL + +MARK CHECKEOF +TEST EOF +FJMP READDIGIT + +TEST #DIAL = 1 +FJMP FAIL + +MARK SUCCESS +COPY -1 #DIAL +HALT + +MARK FAIL +HALT diff --git a/README.md b/README.md index cb7702f..d76c367 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,4 @@ They definitely aren't the most optimized, but I'm proud I got them to work at a 2. [Motor Vehicle Administration: Scheduling System](42-motor-vehicle-administration-scheduling-system) 3. [Cybermyth Studios: Accounting System](43-cybermyth-studios-accounting-system) 4. [U.S. Department of Defense: USAF Secure Facility](44-us-department-of-defense-usaf-secure-facility) +5. [NETronics NET40 Modem: The Wardialer](45-nettronics-net40-modem-the-wardialer) -- 2.45.2