Main Menu

Issue with print #1 command

Started by xboxisfinished, 07 Aug, 2021, 03:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SamuraiCrow

#45
The word "bank" should be deleted because it thinks it is a function or variable.  https://www.ultimateamiga.co.uk/HostedProjects/AMOSFactory/AMOSProManual/5/578.html

I assumed you had the manual.  I haven't programmed in AmosPro for a long time and was typing from memory on my phone.

Also, you have the right idea about the Peek$ function.  Just give StringLength a big number bigger than your biggest string.  As long as it finds the Chr$(0) at the end it will stop.

xboxisfinished

#46
Quote from: SamuraiCrow on 09 Aug, 2021, 11:30 PM
As a non-AMCAF implementation of the encryption, substitute the following for the Bank Code lines:
For C=Start(16) To Start(16)+Length(16)-2 Step 2
    Doke C, Rol.w(Xor(Deek(C),$A55A),5)
Next C


To decode the prevous encryption:
For C=Start(16) To Start(16)+Length(16)-2 Step 2
   Doke C, Xor(Ror.w(Deek(C),5),$A55A)
Next C


If it's not fast enough, assign the end expression of the for loops (everything between the To keyword to the Step keyword) to a variable and test against that inside the loop.  Also, be sure the file is loaded before you assign the expression to the value.

This code resulted in a syntax error.

By the way the loop is fine..it crashes the second the first line of bank code xor.w 16,$a55a is executed.

SamuraiCrow

#47
Bank code Xor.w, Bank Code ROL.w and Bank Code ROR.w requires the AMCAF extension.  Use the loop instead.

xboxisfinished

Quote from: SamuraiCrow on 10 Aug, 2021, 03:21 AM
Bank code Xor.w, Bank Code ROL.w and Bank Code ROR.w requires the AMCAF extension.  Use the loop instead.

I have the extension. Even if I use the loop it returns syntax error. It would not allow me to compile.

SamuraiCrow

https://www.ultimateamiga.co.uk/HostedProjects/AMOSFactory/AMOSProManual/14/1409.html

According to the manual, the 5 should come first and doesn't return a value.  The loop that had the rotate inside should be

ROL.W 5, C
Doke C, Deek(c) Xor $A55A


And the other loop should be:

Doke C, Deek(c) Xor $A55A
Ror.w 5, C
inside the loop.

xboxisfinished

saving worked. It made a 1.7 MB encrypted file. Loading failed. It kept my hard drive activity endless working, then screen turn blue while loading and then went into software failure. Maybe because I am still using bank code. Let me try with your new code change.

xboxisfinished

The decoding is not working. It is still reading jibberish. It have failed to decode. Can you help me?