Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4]   Go Down

Author Topic: Issue with print #1 command  (Read 7667 times)

0 Members and 1 Guest are viewing this topic.

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Issue with print #1 command
« Reply #45 on: August 10, 2021, 01:24:27 AM »

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.
« Last Edit: August 10, 2021, 01:28:28 AM by SamuraiCrow »
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Issue with print #1 command
« Reply #46 on: August 10, 2021, 01:32:37 AM »

As a non-AMCAF implementation of the encryption, substitute the following for the Bank Code lines:
Code: [Select]
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:
Code: [Select]
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.
« Last Edit: August 10, 2021, 01:36:39 AM by xboxisfinished »
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Issue with print #1 command
« Reply #47 on: August 10, 2021, 02:21:01 AM »

Bank code Xor.w, Bank Code ROL.w and Bank Code ROR.w requires the AMCAF extension.  Use the loop instead.
« Last Edit: August 10, 2021, 02:51:21 AM by SamuraiCrow »
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Issue with print #1 command
« Reply #48 on: August 10, 2021, 02:55:08 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.
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Issue with print #1 command
« Reply #49 on: August 10, 2021, 03:07:02 AM »

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
Code: [Select]
ROL.W 5, C
Doke C, Deek(c) Xor $A55A

And the other loop should be:
Code: [Select]
Doke C, Deek(c) Xor $A55A
Ror.w 5, C
inside the loop.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Issue with print #1 command
« Reply #50 on: August 10, 2021, 04:54:13 AM »

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.
Logged

xboxisfinished

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 205
  • Generic Amiga User
    • gamemakermagazine.com
Re: Issue with print #1 command
« Reply #51 on: August 10, 2021, 05:05:35 PM »

The decoding is not working. It is still reading jibberish. It have failed to decode. Can you help me?
Logged
Pages: 1 2 3 [4]   Go Up
 

TinyPortal 2.2.2 © 2005-2022