EXAPUNKS

EXAPUNKS

View Stats:
So close!!!!
I am so close to figuring out the EXA-blaster 2 with the phone number dialing, and I just need to figure out how to get the contact list bigger. Test 1 works just fine, but test 2 seems to freeze on the third contact list. I'm assuming that the polem's something like one of the last 2 phones having 2 contacts in it instead of 1, but I'm totally stuck trying to figure out how to get it to detect. Any advice?

Code posted below in spoilers:

XA: GRAB 300 LINK 800 MARK 00 MULI X -11 X SEEK X DIVI X -11 X MODE MARK DIAL TEST MRD TJMP GRABBER COPY -1 #DIAL COPY 11 T MARK S COPY F #DIAL SUBI T 1 T TJMP S COPY 1 M SUBI X 1 X TEST X > 0 TJMP DIAL MARK GRABBER MODE COPY 0 X SEEK 999 MARK GRAB ADDI X 1 X @REP 11 COPY M F @END COPY M T FJMP GRAB MODE COPY M T MODE TJMP 00 LINK -1 XB: LINK 800 COPY 8 X MODE MARK S VOID M REPL GO NOOP NOOP NOOP TEST MRD FJMP S VOID M SUBI X 1 X TEST X = 0 COPY X M FJMP S HALT MARK GO LINK 800 LINK -1 COPY 1 M LINK 800 MODE GRAB 200 MARK COPY COPY 4 M COPY 7 M COPY 2 M SEEK 4 @REP 8 COPY F M @END TEST EOF COPY T M FJMP COPY [/spoiler]
< >
Showing 1-9 of 9 comments
This bit of code, I understand what you're trying to do here, but it's neither necessary, nor works.

MULI X -11 X
SEEK X
DIVI X -11 X

Specifically, it conflicts with:
COPY 0 X
SEEK 999

Because, if a single phone returns multiple good numbers, you will get into trouble. In your logic, you find a good number, add stuff to the end of your list, and then start dialing only the numbers *of that last phone* and you miss out on that 'second' good number. Similarly, if a phone has no good numbers, you'll get stuck.

Mind you, the goal is not to actually have a list, just to connect (!). (I guess that Ember is scribbling valid numbers along with you, or something)

So, there's multiple solutions, to 'pop the stack' better without skipping numbers.
Also, but this is just something funny:

COPY 4 M
COPY 7 M
COPY 2 M
SEEK 4
@REP 8
COPY F M
@END
Although clever, this doesn't save you lines or cycles over a simpler:
SEEK 1
@REP 11
COPY F M
@END
Alright, so then probably the best thing for it would be to just go through the lines and be okay with them overwriting from time to time?

Or, oh, wait, like you said, there's no need for a file, so the entire "copy F M" bit is superflous. That'll save a lot of cycles and lines. Thanks!
To save lines, get rid of XB. You will want to save some intermediate data somewhere, since you can't communicate with a phone when the connection is broken. Overwriting is no problem at all. Nor is voiding. My best approach is
LIFO
Make sure you only overwrite a number you've dialed. I managed to do it by jumping into a delete block of code after each dial to guarantee every number was rang only once then deleted.
That's a clever way. Mine spoiled:
Starting with the the list of 1 number: after I dial a number, I jump 11 positions (one number) back. And then test if it was a 'valid number'

In case it is, I start writing down the new numbers, effectively overwriting the 'last known good' number (and whatever crap is tailing it) on the list.

Then (or in case I don't get any new numbers), I jump back 11 positions and start the dialloop again.

Since it's LIFO, and numbers are added to the tail of where I was in the list, I never overwrite a possible valid number.
(it does save cycles to hardcode 4 7 2, since you don't have to send those numbers from the hosts you link into)
Good point, I hadn't really noticed that in the code above, but I get your point how you can reduce cycles by hardcoding.
This one was a tough one - just finished it. The combination of multiple numbers per file and some invalid numbers (and of course the restriction that you can't bring the file back with you, nor start dialing while your Exa's transmitting numbers), made it so in the end I was just brute-forcing to get through and not caring about optimization.
< >
Showing 1-9 of 9 comments
Per page: 1530 50