Author Topic: Asm( HEX as appvar?  (Read 4882 times)

0 Members and 1 Guest are viewing this topic.

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Asm( HEX as appvar?
« on: October 14, 2010, 01:34:31 pm »
Allright, would the following be possible?
Let's say, I have this piece of code:
Code: [Select]
1->{50+L1

1. What would the code be in asm hex (so I can use it with the axe asm( command?)
2. I wanna be able to make this dynamic (what pieces of that code do I need to change to, for example do 5->{25+L1
3. Can this hex code be stored in appvars or any other data containers?

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Asm( HEX as appvar?
« Reply #1 on: October 14, 2010, 02:29:25 pm »
It would be

Code: (Axe/ASM) [Select]
:Asm(210100225687

for the code you gave. To edit it, you would need to change that 01 to a 05 or whatever you want.




Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Asm( HEX as appvar?
« Reply #2 on: October 14, 2010, 03:22:08 pm »
ah, doing self modifying code i see?

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Asm( HEX as appvar?
« Reply #3 on: October 14, 2010, 03:56:18 pm »
No, trying to place scripted events outside the source code.
Would drastically reduce the amount of space needed, or even allowing zelda to run as prgm instead of an app.

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Asm( HEX as appvar?
« Reply #4 on: October 14, 2010, 04:29:30 pm »
Wouldn't they still count toward the code limit, or is it something different? I heard some people circumvent the code limit by moving stuff around in assembly but I'm not sure how to do it in Axe.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Asm( HEX as appvar?
« Reply #5 on: October 14, 2010, 07:04:20 pm »
Wouldn't they still count toward the code limit, or is it something different? I heard some people circumvent the code limit by moving stuff around in assembly but I'm not sure how to do it in Axe.

Yeah, to do it, you just copy code that starts after $C000 (when the program is copied) to a safe RAM place, such as L1, and execute it from there.




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Asm( HEX as appvar?
« Reply #6 on: October 14, 2010, 11:39:24 pm »
Oh great that's nice :D.

I wonder if the code can simply be stored as data to a pointer then the data copied? I guess that means only hex asm can be used in that case, though :P

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Asm( HEX as appvar?
« Reply #7 on: October 15, 2010, 05:12:37 pm »
Well, you could compile the bit of code and move that...




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Asm( HEX as appvar?
« Reply #8 on: October 15, 2010, 05:58:07 pm »
Yeah but then it would count in the executable code limit, right?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Asm( HEX as appvar?
« Reply #9 on: October 15, 2010, 06:04:17 pm »
I meant maybe someone could compile it separately from the main program, copy that code somewhere, then run it from there in the main program...

Kinda pointless, though.




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Asm( HEX as appvar?
« Reply #10 on: October 15, 2010, 08:11:51 pm »
Idk I am confused. That code would be included in the executable code it's for sure