Variable size declrations being ignored

Discuss the Firewing language

Variable size declrations being ignored

Postby Timbo » Wed May 13, 2015 3:14 pm

Its in me to always produce the smallest code I can, so I regularly check the asm for bloat

So I modified some code from doing a mod on a UIntriguer to count to 10 to a simple inc routine

Dim _100hZTick as byte

if OnTick <> nothing then
IF _100hZTick = 10 THEN
_100hZTick = 0
RaiseEvent OnTick() ' raise event
end if
end if

But looking at the asm I see

SimCapture 1.PNG
SimCapture 1.PNG (12.65 KiB) Viewed 9036 times


My byte assignment of the variable has been ignored and turned into a Dword

Is this the case for every variable I declare?

thanks
Timbo
 
Posts: 93
Joined: Fri May 03, 2013 7:51 pm

Re: Variable size declrations being ignored

Postby Timbo » Wed May 13, 2015 3:27 pm

OK It seems I have managed screwed up.

I saved and compiled files but when checking the time stamps it seems I was looking at the wrong version of the file to check the ASM

Looking now and it is indeed producing very compact byte based code.


So 3 balls up in one day. I need to test more and post less....
Timbo
 
Posts: 93
Joined: Fri May 03, 2013 7:51 pm

Re: Variable size declrations being ignored

Postby Jerry Messina » Wed May 13, 2015 7:22 pm

I need to test more and post less....


So far today you're doing pretty good. At the rate you're going perhaps you should post MORE, and that way maybe you'll get answers even faster!
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x