falingtrea, thank you for your detailed answer. (Un)fortunately I left assembler behind me a few years ago when I started with PBP. And I would like to not go back.
So do you all agree that it is roughly 3uS per loop as T.Jackson states?
Offtopic:
I am sure that T.Jackson has his reasons to react the way he did.
Coming from his kind of answer compared to all answers in this thread, Acetronics does have mental issues.
It is something between T.Jackson and Acetronics, and you were not invited to be a freeloader, skimask. So stay out of this.
Actually, I think they all agree that you should measure it for yourself.
instruction execution time
http://www.picbasic.co.uk/forum/showthread.php?t=365
And I also think that the Rest of the forum agrees that everyone here needs to calm down.
I have the complaints to back that up.
Mellow out! Or stop posting.
<br>
DT
skimask, happy birthday.
I created a new code:
There was no lst created but a mac, asm and hex.Code:Zahl VAR WORD DEFINE OSC 20 WHILE Zahl < 60000 Zahl = Zahl + 1 WEND
mac:
asm:Code:NOLIST LABEL?L macro Label RST?RP ifdef PM_USED LALL Label XALL else Label endif endm ADD?WCW macro Win, Cin, Wout if (Wout == Win) if (Cin == 1) CHK?RP Wout incf Wout, F btfsc STATUS, Z incf Wout + 1, F else movlw low (Cin) CHK?RP Wout addwf Wout, F if (((Cin) >> 8) == 0) btfsc STATUS, C incf Wout + 1, F else movlw (Cin) >> 8 btfsc STATUS, C addlw 1 addwf Wout + 1, F endif endif else movlw low (Cin) CHK?RP Win addwf Win, W MOVE?AB Wout if (((Cin) >> 8) == 0) MOVE?BA Win + 1 btfsc STATUS, C addlw 1 MOVE?AB Wout + 1 else movlw (Cin) >> 8 btfsc STATUS, C addlw 1 CHK?RP Win addwf Win + 1, W MOVE?AB Wout + 1 endif endif endm CMPGE?WCL macro Win, Cin, Label MOVE?WW Win, R0 MOVE?CB (Cin) >> 8, R1 + 1 MOVE?CA low (Cin) L?CALL CMPGE BIT?GOTO 0, STATUS, Z, Label endm CMPGE_USED = 1 GOTO?L macro Label L?GOTO Label endm LIST
How do you filter out the information needed?Code:PM_USED EQU 1 INCLUDE "16F628A.INC" ; Define statements. #define OSC 20 RAM_START EQU 00020h RAM_END EQU 0014Fh RAM_BANKS EQU 00003h BANK0_START EQU 00020h BANK0_END EQU 0007Fh BANK1_START EQU 000A0h BANK1_END EQU 000EFh BANK2_START EQU 00120h BANK2_END EQU 0014Fh EEPROM_START EQU 02100h EEPROM_END EQU 0217Fh R0 EQU RAM_START + 000h R1 EQU RAM_START + 002h R2 EQU RAM_START + 004h R3 EQU RAM_START + 006h R4 EQU RAM_START + 008h R5 EQU RAM_START + 00Ah R6 EQU RAM_START + 00Ch R7 EQU RAM_START + 00Eh R8 EQU RAM_START + 010h FLAGS EQU RAM_START + 012h GOP EQU RAM_START + 013h RM1 EQU RAM_START + 014h RM2 EQU RAM_START + 015h RR1 EQU RAM_START + 016h RR2 EQU RAM_START + 017h _Zahl EQU RAM_START + 018h _PORTL EQU PORTB _PORTH EQU PORTA _TRISL EQU TRISB _TRISH EQU TRISA INCLUDE "KKK.MAC" INCLUDE "PBPPIC14.LIB" LABEL?L L00001 CMPGE?WCL _Zahl, 0EA60h, L00002 ADD?WCW _Zahl, 001h, _Zahl GOTO?L L00001 LABEL?L L00002 END
There's a checkbox in MCS for telling MCS to kick out a .lst file during the compilation.
Put easily recognizable labels before and after the code section that your after in your PBP source and when the .lst file gets created, do a search (Ctrl-F) for those labels and you should be able to see them right off.
This is what is written in between
What is more, there is no question about my configuration. It is a timing issue. The osc value determines the speed to let the program know how many cycles one millisecond will take f.i.. Knowing the speed there is enough information to reproduce the question and to give an answer. I am not here to relearn what would take others just a few seconds to reproduce - less than writing a "do it yourself" takes.Code:48 LABEL?L L00001 + LALL + 0019- L00001 49 CMPGE?WCL _Zahl, 0EA60h, L00002 + 0019- 0838 movf _Zahl, W + 001A- 00A0 movwf R0 + 001B- 0839 movf (_Zahl) + 1, W + 001C- 00A1 movwf (R0) + 1 + 001D- 30EA movlw low ((0EA60h) >> 8) + 001E- 00A3 movwf R1 + 1 + 001F- 3060 movlw low (low (0EA60h)) + 0020- 2001 call CMPGE + 0021- 1D03 btfss STATUS, Z + 0022- 2827 goto L00002 50 ADD?WCW _Zahl, 001h, _Zahl + 0023- 0AB8 incf _Zahl, F + 0024- 1903 btfsc STATUS, Z + 0025- 0AB9 incf _Zahl + 1, F 51 GOTO?L L00001 + 0026- 2819 goto L00001 52 LABEL?L L00002 + LALL + 0027- L00002 53
I am going to use Jackson's 3us and this is the end of the story.
Do not make things more complicated than they have to be.
Last edited by Ted's; - 29th June 2008 at 11:49.
Bookmarks