24.48K because?
Printable View
24.48K because?
For the fa one its easier just to do this...
Same goes for the other one, well sorta :\Code:ldr r0, text
ldr r1, slot
ldrh r3, word
ldrh r5, done
ldrh r4, item
ldrh r2, [r0]
cmp r2, r3
bxne lr
strh r5, [r0]
strh r4, [r1]
bx lr
text:
.long 0x22AF136
slot:
.long 0x21D88FE
word:
.ascii "fa"
done:
.ascii "ok"
item:
.short 0x14FD
While gh was down, I got bored and made 2 new codes. They're practically the same codes though, but whatever. I based these off of someone else's codes, except they didn't use assembly and they used button activators, while I use assembly an text activators.
I could have made them into a single code, but it'd be huge.Code:removed
Here is my smart inventory code with loops :D
Type "st" and send it to store the item in the first empty slot. If the code finds an empty slot, it will store the item and alert you by saying "ok"
if the code doesn't find an empty slot (if your inventory is completely full) it will alert you by saying "no". It's set to store a pitfall, but you can replace 1566 with the item you want(it's near the bottom of the code)
(spoiler used to shorten this post)
and the source
Do you guys think I'm good now? :)
Sorry for posting AGAIN...I wish I could delete all my other threads in the "amateur coding" section (please move them to the trash Maniac)
but I have a question again. I was thinking of making a real-time acre editor. At first I was just gonna make it be a cycler, where I press an activator to add a certain amount then press something else to move to the next address. However, it'd be a lot easier if I could just type the value I want. But, I don't know how to get the right value that way, because for example if you type "1a" on the chat keyboard, it'll be equal to 361b...
Also, I understand practically everything now, although I'm not sure when you'd need to use a logical shift (like lsl)
At least, that's the only thing I've encountered so far in the TTI source that I didn't understand, and I need to know what it does in order to understand the loop part of TTI.
Edit: here is the cycler source. It isn't fully working yet, but as you can tell it's HUGE. That's why I'd rather be able to write acres using a "text to acre" code of sorts.
Code:removed
lsl, each shift is a multiplication by 2 with the result anded by 0xFFFFFFFF, it's multiplying by 2^immediate.
mov Rd, Rm, lsl #0ximmediate is the syntax for ARM mode.
mov r0, r1, lsl #0x4
(2^4 = 16)
That would multiple r1 by 16 and store it into r0... I really don't see what you don't understand but alright >_>