PDA

View Full Version : mikrobasic to picbasicpro



nicolasronan
- 6th September 2006, 18:56
hello
I have find a code in mikrobasic, I would like to convert it into picbasicpro. mikrobasic uses subprocedure and subroutine, but not picbasicpro. how to convert this piece of code for example:

'********************************
sub procedure nju_addressY(dim adr as byte)
dim y as byte
' drugi chip ima offset +20
if bLcdDG = 1 then
y = adr + 20
else
y = adr
end if
' if adr >= 61 then
' y = y - 61 '// test cote : si partie droite => -61 (test dimensions: so right part = -61 )
' end if
nju_putcmd(y and 0x7F) 'nju_putcmd(0x00 or (y and 0x7F) )
end sub
'********************************

nicolasronan
- 6th September 2006, 20:24
sorry it s simple:

nju_addressY:
adr var byte
y var byte
' drugi chip ima offset +20
if bLcdDG = 1 then
y = adr + 20
else
y = adr
end if
' if adr >= 61 then
' y = y - 61 '// test cote : si partie droite => -61 (test dimensions: so right part = -61 )
' end if
gosub nju_putcmd
return

nicolasronan
- 6th September 2006, 20:44
const chars as byte[15] = (
0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x4F,0x00,0x00,
0x00,0x7,0x00,0x7,0x00)

how convert thid code to pbp?
i think:
chars var byte[15]
and after how do for the table ???
please

mister_e
- 6th September 2006, 22:34
chars[0]=0
chars[1]=0
.
.
.