t-edson / PicPas

Compilador en Pascal para microcontroladores PIC / Pascal compiler for PIC microcontrollers
GNU General Public License v2.0
88 stars 27 forks source link

I want to say you some bug report, but i didnt find a way for that. #19

Closed tikitatiktik closed 6 years ago

tikitatiktik commented 7 years ago

you have an error "for" loop and "while TXSTA_TXEN = 0 do end; " . Those are very important. I want to inform you, if you are interest. Good luck. You will see when you have to try this command row for test.

t-edson commented 7 years ago

Hi. Could you please give more detail on the error. I can compile "while TXSTA_TXEN = 0 do end; " without problems.

tikitatiktik commented 7 years ago

Hi. You will see an error when you focus to highlighted lines on the picture.

picpas:

while TXSTA_TRMT = 0 do end;

list file:

0x0DD btfsc RCSTA_OERR

"TXSTA" is converting to "RCSTA" . Thanks for your interest. Have a nice day.


Gönderen: Tito Hinostroza notifications@github.com Gönderildi: 22 Kasım 2017 Çarşamba 14:35:47 Kime: t-edson/PicPas Bilgi: tikitatiktik; Author Konu: Re: [t-edson/PicPas] I want to say you some bug report, but i didnt find a way for that. (#19)

Hi. Could you please give more detail on the error. I can compile "while TXSTA_TXEN = 0 do end; " without problems.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ft-edson%2FPicPas%2Fissues%2F19%23issuecomment-346367677&data=02%7C01%7Ccayaydin%40hotmail.com%7C1e887b00a74c4759466308d531b65250%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636469581484257612&sdata=nMnga9HyrhBHAou3S8SvAgqYkm2je6xxlgJbDjsJEb4%3D&reserved=0, or mute the threadhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAfPKcy3ZFBEEMAvaZCoAN6HnBdKRHMD6ks5s5DFCgaJpZM4QlLM8&data=02%7C01%7Ccayaydin%40hotmail.com%7C1e887b00a74c4759466308d531b65250%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636469581484257612&sdata=Vh0onpqRBtWHVh2PvqYcH0H6rRLOE4fV1fc1vsRjSyc%3D&reserved=0.

tikitatiktik commented 7 years ago

txsta_trmt

t-edson commented 7 years ago

I see. The code is compiled right. The assembler code is wrong. TXSTA and RCSTA share the same address but different RAM bank. The disassembler, have no way to know if the address 0x18 of the opcode btfsc, refers to teh bank0 or the bank1. The compiler work well. It's just the assembler view is generated from the binary directly, where the bank address is lost.

t-edson commented 7 years ago

PicPas doesn't generate assembler code. It compiles directly to binary. That's the problem. Once binary created, there is not information about banks in opcodes, in the binary. It's an issue of the disassembler. I have considered to include some aditional information in the binary, to solve this problem, but it will take some time.