exapunks-solutions icon indicating copy to clipboard operation
exapunks-solutions copied to clipboard

TEC EXA-Blaster Modem - Pager Network

Open lakeofsoft opened this issue 7 years ago • 3 comments

solution no longer valid, copy (local or global) will not pass data over disconnected modem link

lakeofsoft avatar Oct 29 '18 02:10 lakeofsoft

Hey. I noticed that too. I am not sure if you need it, but I did post a fix in my issue. I realised his code didn't work, and so I wrote my own, and uploaded it. My solution isn't elegant or anything, but it works.

I'll post my solution here too, to make it easy for you ( and others ) to find. Just a notice, you must set the EXA shared data to LOCAL. If you don't, well - it won't work. Haha.


XA

GRAB 301
LINK 800

MARK ADDRLOOP
COPY 11 X

MARK DIALLOOP
COPY F #DIAL
SUBI X 1 X
TEST X > 0
TJMP DIALLOOP
COPY 1 M
VOID M
COPY -1 #DIAL
TEST EOF
FJMP ADDRLOOP
COPY -1 M
WIPE
HALT

XB

NOTE TRANSFER BOT
GRAB 300
MARK LOOP
COPY M X
TEST X = -1
TJMP DIE
COPY F M
TEST EOF
TJMP RESET
JUMP LOOP

MARK RESET
SEEK -9999
JUMP LOOP

MARK DIE
HALT

XC

LINK 800

MARK DATALOOP
COPY M X
TEST X = -1
TJMP DONE

MARK TRANSFER_LOOP
LINK -1
COPY 1 M
COPY M X
LINK 800
LINK 800
REPL OVERWRITE_NAMES
LINK -1
LINK -1
COPY 1 M
COPY M X
LINK 800
LINK 800
REPL OVERWRITE_ARTISTS
LINK -1
COPY 1 M
JUMP DATALOOP

MARK OVERWRITE_NAMES
GRAB 200
MARK OWN_LOOP
COPY X F
SEEK 1
TEST EOF
FJMP OWN_LOOP
COPY 1 M
HALT

MARK OVERWRITE_ARTISTS
VOID M
GRAB 200
MARK OWA_LOOP
SEEK 1
COPY X F
TEST EOF
FJMP OWA_LOOP
HALT

MARK DONE
LINK -1
COPY -1 M
HALT

alexthepuppy avatar Jan 08 '19 01:01 alexthepuppy

Managed to do it in 651:62:26

Here is my solution(you may add it as replacement):

XB:

GRAB 301
LINK 800

XA:

GRAB 300
LINK 800
MARK COUNT_OFFSET
TEST EOF
TJMP STOP_COUNTING
SEEK 1
ADDI X 1 X
JUMP COUNT_OFFSET
MARK STOP_COUNTING
DROP
GRAB 301

MARK DIAL
TEST EOF
TJMP END
@REP 11
COPY F #DIAL
@END 
REPL DATA_SENDER
VOID M
REPL SET_TIMER
COPY -1 #DIAL
JUMP DIAL

MARK DATA_SENDER
GRAB 300
LINK 800
MARK SEND_LOOP
TEST EOF
FJMP TX_ACT
LINK -1
COPY 1 M
MARK TX_ACT
COPY F #DATA
JUMP SEND_LOOP

MARK SET_TIMER
LINK 800
MAKE
FILE T
WIPE
SUBI 407 T T
ADDI X 6 X; DELAYED BY MESSAGE SIZE + 6
MULI T X T; MULTI BY BOT NUMBER DESC
MARK AWAIT_TIMER
FJMP TIMER_ACT
NOOP
SUBI T 1 T
JUMP AWAIT_TIMER
MARK TIMER_ACT
COPY 1 #PAGE

MARK END
WIPE
GRAB 300
WIPE

hennadii-demchenko avatar Mar 25 '20 21:03 hennadii-demchenko

@alexwolfe19 it is a waste of size to put halt at the end of a program, the exa errors out when the end is reached.

taitep avatar Sep 17 '23 10:09 taitep