get lo and high byte of a word ?

General discussion on mikroBasic PRO for AVR.
Post Reply
Author
Message
plouf
Posts: 27
Joined: 16 Jan 2015 09:34
Location: Athens,Greece

get lo and high byte of a word ?

#1 Post by plouf » 19 Aug 2017 23:29

like
sub function Lo(dim number as word) as byte
Christos

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: get lo and high byte of a word ?

#2 Post by darko.ilijevski » 21 Aug 2017 16:41

Hello,

Can you please try to clarify what do you want to achieve ? That function already exists and it works the way you want :

Code: Select all

program MyProject

dim d as word
dim tmp as byte

main:
 d = 0xFFAA
 tmp = Lo(d)      ' Equals 0x170 (0xAA)
 tmp = tmp + 1    ' Use it to avoid purging
end.
Use the software debug and you will see that the values are correct

Regards
BR,
Darko

Post Reply

Return to “mikroBasic PRO for AVR General”