Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I personally started there, and added to that. Be careful of 0!
MARK SENDDAT
COPY -9999 X
NOTE global communication
ADDI M X X
ADDI F X X
TEST X < 1
TJMP LESS
NOTE I forgot if this needs
NOTE ADDI X 1 X
[send it]
JUMP SENDDAT
MARK LESS
ADDI X 9999 X
<send it>
JUMP SENDDAT
There are much more elaborate and better ways of doing this, this is just my base first prototype that worked.
You can then postprocess the final value by checking if the result > 0.
MARK LOOP
TEST EOF
TJMP DONE
ADDI F M X
TEST X > 0 ' Check for overfow
TJMP WRITE ' Overflow happened, final value x-1
ADDI X 9999 X ' No overflow happend, final value = x + 9999
MARK WRITE
SUBI X T X ' Correct based on test outcome
SEEK -1
COPY X F ' Overwrite original file to encoded file
JUMP LOOP
MARK DONE
EXA for providing the encoding keys:
LINK 800
MODE
GRAB 199
MARK LOOP
SUBI F 9999 M 'send out key-9999
TEST EOF
FJMP LOOP
SEEK -9999
JUMP LOOP
I failed to realize I can count both ways.
The optimization tips were very helpful also!