Maker Pro
Maker Pro

MikroBasic for pic questions

richardb

Dec 21, 2013
48
Joined
Dec 21, 2013
Messages
48
have a few question for those in the know.

I have been using swordfish basic compiler for a long time now and I am very happy with it, but I have a need for using faster processors and for hobby's smaller ones than the 18 series pics.

1. Is the syntax the same across all three compilers, I've had a quick look at the 18 series to compare to swordfish.

if so


Do they support overloaded subs and compound subs? it didn't seem obvious to me.

Compound subs are so useful particularly with comms.
eg

Code:
// overloaded sub to output a string...
sub WriteItem(pValue as string)
     something here to write a string
end sub

// overloaded sub to output a byte...
sub WriteItem(pValue as byte)
     something here to write a byte
end sub

// create compound subroutine...
compound sub Write(WriteItem)

// make the call...
Write(10,"Hello World", 13, 10)


do they support bit, byte and sub/function aliasing


so can you do things like the following

Code:
dim Value as word
Value.Byte1 = $FF



dim Array(10) as word // a word array
dim ElementAlias as Array(3) // alias to element 4
dim ByteAlias as ElementAlias.Byte1 // element 4, high byte
dim BitAlias as ByteAlias.7 // element 4, high byte, bit 7


Finally can I use the 8 bit compiler indefinitely with the 2k limit? as a hobbyist

Richard
 

p.erasmus

Jul 18, 2013
60
Joined
Jul 18, 2013
Messages
60
have a few question for those in the know.

I have been using swordfish basic compiler for a long time now and I am very happy with it, but I have a need for using faster processors and for hobby's smaller ones than the 18 series pics.

1. Is the syntax the same across all three compilers, I've had a quick look at the 18 series to compare to swordfish.

if so


Do they support overloaded subs and compound subs? it didn't seem obvious to me.

Compound subs are so useful particularly with comms.
eg

Code:
// overloaded sub to output a string...
sub WriteItem(pValue as string)
     something here to write a string
end sub

// overloaded sub to output a byte...
sub WriteItem(pValue as byte)
     something here to write a byte
end sub

// create compound subroutine...
compound sub Write(WriteItem)

// make the call...
Write(10,"Hello World", 13, 10)


do they support bit, byte and sub/function aliasing


so can you do things like the following

Code:
dim Value as word
Value.Byte1 = $FF



dim Array(10) as word // a word array
dim ElementAlias as Array(3) // alias to element 4
dim ByteAlias as ElementAlias.Byte1 // element 4, high byte
dim BitAlias as ByteAlias.7 // element 4, high byte, bit 7


Finally can I use the 8 bit compiler indefinitely with the 2k limit? as a hobbyist

Richard

I see no reason why you can not do this in the MBP compiler it even supports structures and pointers .
You can us ethe free version as long as you want as long as you can live with the 2K limit there is no expire date on the Demo version
 

richardb

Dec 21, 2013
48
Joined
Dec 21, 2013
Messages
48
I see no reason why you can not do this in the MBP compiler it even supports structures and pointers .
I don't want to sound like a grumpy bugger and thanks for replying but many compilers support structures and pointers in one way or another, but i didnt ask about them.

what about any of the specific points that i asked about?

overloading ?
compound subs and functions?
aliasing?





You can us ethe free version as long as you want as long as you can live with the 2K limit there is no expire date on the Demo version

cool i can try it with the 8 pin for home projects

Richard
 
Top