Search found 17 matches
- 23 Oct 2009 17:28
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
Yay ! now we are zipping along fine. thanks to all! @octal : yes i am proficient in assembler. on ARM7, ARM9 and 8051. Initially i did not want to learn PIC assembler. That is why i picked BASIC in the first place. My idea was ; hey BASIC. I'll code this up and if its even half decent that is fine. ...
- 23 Oct 2009 02:56
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
here is the full definition of the code (for reference) symbol vLCD_PORT = portb symbol vLCD_RS = lata4_bit symbol vLCD_EN = lata5_bit Sub procedure lcd_print_dyn(dim byref x as string) FSR0 =word(@x) LCD_RS=0 while INDF0<>0 vLCD_PORT = POSTINC0 vLCD_EN=0 vLCD_EN=1 wend end sub sample usage : lcd_pr...
- 23 Oct 2009 02:53
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
I never said the compiler was bad. The libraries are bad ! (and the documentation sucks too ) All right. what does that stuff do ? let me guess : FSR0=word(@x) you set a register '0' to point to the string INDF0 <> 0 : you compare indirectly register '0' with null. POSTINC0 : you grab data from 0 an...
- 23 Oct 2009 00:08
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
All right. we are getting somewhere. janni put me on the right track. Symbol LCD_PORT P1 Symbol LCD_RS P3.B2 Symbol LCD_EN P3.B1 Sub procedure lcd_print_dyn(dim byref x as string) dim p as ^word dim s as char p = x s = p^ LCD_RS=0 lus : if s=0 then goto done LCD_PORT = s LCD_EN=0 LCD_EN=1 inc(p) got...
- 22 Oct 2009 23:34
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
1- If ALL your string you are passing are "constants": They are. And all that should be passed is a pointer to the string. Yet the way microbasic handles this is by copying the string from ROm to RAM and in a very peculiar way : They set up a memory pointer in ram and then use MOV operations to cop...
- 22 Oct 2009 19:15
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
- 22 Oct 2009 19:08
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
- 22 Oct 2009 17:52
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
Since you want to rewrite all code of libs in asm to take benefits from low level hardware, why not simply use the compiler just for "normal" code flow just to be able to remove code from them? That is exactly what i intend on doing. I am used to make BSP libraries for a project ( BSP = Board suppo...
- 21 Oct 2009 23:12
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
From looking at the assembler code i figured that out. This is very inefficient ! Everything you do is beeing moved to ram first... and then the target function is called. Who moves it once more. result : tons of wasted cpu cycles and tons of wasted ram. The MicroE comnpilers do not understand the c...
- 21 Oct 2009 20:12
- Forum: mikroBasic PRO for PIC General
- Topic: library sourcecode
- Replies: 29
- Views: 11329
my main for having the source to some of the librarties is to figure out how to make certain things. for example. the lcd_print sub can take both a literal as well as a variable. how do you write such a subroutine ? it would save me a lot of time having to figure this out ... some of the lcd routine...
- 21 Oct 2009 01:40
- Forum: mikroBasic Wish List
- Topic: pointers to code space, library optimisation
- Replies: 2
- Views: 3725
here is more info : program Lcd_Test const pp as string[16]="hello wrold" sub procedure my_lcd_print (dim x as word) dim p as ^word ' create pointer dim s as char p = x ' attach to x while p^ <>0 P0 = p^ p1.B4 = 1 p1.B4 = 0 inc(p) wend end sub main: my_lcd_print (@pp) ' this should also be valid cod...
- 21 Oct 2009 01:12
- Forum: mikroBasic Wish List
- Topic: pointers to code space, library optimisation
- Replies: 2
- Views: 3725
- 21 Oct 2009 01:10
- Forum: mikroBasic Wish List
- Topic: pointers to code space, library optimisation
- Replies: 2
- Views: 3725
pointers to code space, library optimisation
instead of the compiler copying everything to ram and then passing into a function it should be possible to pass a pointer to either RAM or ROM. I f a string is declared as a literal it should reside in rom. the compiler should pass by reference into rom. Current compiler does not do that. it makes ...
- 21 Oct 2009 00:10
- Forum: mikroBasic Wish List
- Topic: Windows and the Others...
- Replies: 9
- Views: 12265
- 20 Oct 2009 21:07
- Forum: mikroBasic PRO for 8051 General
- Topic: passing pointers to strings
- Replies: 2
- Views: 3942
To clarify : this is the intended target code i want to create loop: MOV DPH,STRP ; set DPTR to point to string MOV DPL,STRP+0001H CLR A ; clear accumulator MOVC A,@A+DPTR ; copy contents of dptr into accumulator JZ done ; if zero : end of string jump to exit point SETB P34 ; set P34 (RS pin of LCD)...