Error 151 Mpasm
Contents |
Visited Search Results View More Blog Recent Blog Posts View More PMs Unread PMs Inbox Send New PM View More Page Extras Menu Forum Themes Elegant Mobile Home how to create hex file in mplab » All Forums » [Development Tools] » MPLAB X IDE » Avoiding assembler
How To Download Hex File To Pic
error 151 Mark Thread UnreadFlat Reading Mode❐ Avoiding assembler error 151 Author Post Essentials Only Full Version rumpus52 New Member how to convert asm file to hex file Total Posts : 4 Reward points : 0 Joined: 2013/08/13 17:34:44Location: 0 Status: offline 2013/08/13 18:31:23 (permalink) 0 Avoiding assembler error 151 When I installed MPLAB X I imported my MPLAB 8
How To Create A Hex File
projects and they all get assembler error 151. It occurs when I use "$" to indicate current code address. For example: fill (NOP), 0x0008 - $ The projects are all assembler absolute code - no other language and no relocation. How can I set up an MPLAB X project to do absolute assembly to a hex file and not incur error 151? how to create hex file in proteus thanks #1 4 Replies Related Threads stevereinert Senior Member Total Posts : 143 Reward points : 0 Joined: 2010/05/12 09:20:48Location: Chandler, AZ Status: offline Re:Avoiding assembler error 151 2013/09/03 16:44:42 (permalink) 0 Hi rumpus52, Thanks for your question. What device are you working with? Since you're talking about absolute assembly, do you have the option on the MPLAB 8 project build options MPASM tab for "Generate absolute code" selected? Does this option get translated correctly when you import to X? In X, this is located under the Project Properties | mpasm (Global Options) node as "Build in absolute mode." Thanks, Steve #2 rkondner Starting Member Total Posts : 59 Reward points : 0 Joined: 2013/11/24 19:57:47Location: 0 Status: offline Re:Avoiding assembler error 151 2013/12/30 12:15:07 (permalink) 0 Hi, I was wonderion if you found a solution. I have the same issue with a: #if ($ & 0xFF) > (0xFF - .24) Mine came out of a Microchip Applicatin note so I would think it should work. MPLAB X 1.95 with PIC18F26K20 using Assembly. Thanks, Bob K. #3 rkondner Starting Member Total Posts : 59 Reward points : 0
Previous Next » Thread Last Poster Posts Pages Last Post Closed: New threads not accepted on this page Author Message stylers Frequent ContributorUsername:
Asm To Hex Converter Online
stylersPost Number: 198Registered: 04-2005Rating:N/AVotes:0(Vote!)Posted on Wednesday, 25 January, 2012 - 09:42 am: Hi
Asm To Hex Converter Software Free Download
All, been a good while since I've done any PIC work, so to ease myself back in I've been trying to compile c to hex converter a multi file project I came across.. an open-sourced project called SMST4PIC by Wolfgang Wrankl (a PIC based SMS alarm/control unit). Anyway, there's a bit of code which has relocateable symbols in an expression which throws http://www.microchip.com/forums/m740002.aspx up an mpasm error 151 (Operand contains unresolvable labels or is too complex). here is a snippet.. Data_PDUStatic_Start ;static part of a PDU DE 0x00 ;PDU for SMS DE 0x11 ;message-type-indicator (MTI) DE 0x00 ;message reference number DE 0x0B ;ength of dialing number DE 0x81 ;national dialing number DE 0x10 ;... DE 0x06 ;... DE 0x17 ;... DE 0x71 ;... DE 0x80 ;... DE 0xF8 ;... DE 0x00 ;protocol identifier DE 0x00 http://www.chatzones.co.uk/discus/messages/12743/13157.html?1327484538 ;data coding scheme DE 0xAA ;message validity period (4 days) Data_PDUStatic_End Data_PDUStatic SET Data_PDUStatic_Start - C_EEPROMStartAdr Len_PDUStatic SET Data_PDUStatic_End - Data_PDUStatic_Start The problem is with the SET directive.. mpasm doesn't seem to like having two other labels in the expression, according to the docs, it can only handle "label + constant", and indeed if I replace the label Data_PDUStatic_Start with the address I can see in the listing it compiles ok.. but the code is full of these expressions and tables.. funny thing is there is another expression just like this in another part of the same file that seems to compile ok ! another funny thing is that the author has a listing file which shows that all this compiled ok for him (the only difference i can see from the original listing is that it compiled ok using MPASM V5.20). I'm using mplab V8.7x which has mpasm V5.40.. The main asm file includes all the other files, so I'm compiling this file alone in the mplab project.. I'm sure I must be doing something wrong here so any ideas/pointers greatly appreciated.. I've attached the offending asm file, my list file and the authors original list file.. thanks and regards, stylers. lst and asm filesSMST_asm_list_files.zip (39.1 k) Administration Log Out Previous Page Next Page
BASIC beta Brought to you by: evanvennn, kent_twt4, w_cholmondeley Summary Files Reviews Support Tickets ▾ Bugs Feature Requests News Discussion Code Mailing Lists Great Cow BASIC Help Create Topic Stats Graph Forums Contributors 214 Open Discussion 222 Great https://sourceforge.net/p/gcbasic/discussion/596084/thread/f3803b79/ Cow Graphical BASIC Problems 61 Compiler Problems 376 Help 1095 Chip Files Problems 21 Demonstration Code 7 User Submitted Projects & Guides 9 Help Formatting Help MPASM compatibility issue Forum: Compiler Problems Creator: Jacques Nilo Created: 2015-03-14 Updated: 2015-08-01 Jacques Nilo - 2015-03-14 I often use the asm code generated by GCBASIC to debug my programs. In that context I am using Microchip MPASM which differs from the default GCASM how to used by GCBASIC. Most of the time without any problem. I am running into a problem with the 16F1509 chip (the "15" family) that can be shown with the very simple following program: #chip 16f1509, 8 dim temp as string*5 temp="ABCDE" The corresponding asm file contains the following code: ;temp="ABCDE" movlw low TEMP movwf FSR1L movlw high TEMP movwf FSR1H movlw low StringTable1 movwf SysStringA movlw (high StringTable1) & 127 movwf how to create SysStringA_H call SysReadString But MPASM does not like the "movlw (high StringTable1) & 127" line of code which generates the following error message "Operand contains unresolvable labels or is too complex" I can see where in gcbasic.bas this is done (line 6114) If ChipFamily = 15 Then CurrLine = LinkedListInsert(CurrLine, " movlw (high " + SourceTable + ") & 127") Else A similar statement is generating the same kind of problem line 6523 of gcbasic.bas: BeforePos = LinkedListInsert(BeforePos, " movlw (high StringTable" + Str(ST) + ") | 128") Could it be possible to fix that in a further release ? Many thanks Jacques If you would like to refer to this comment somewhere else in this project, copy and paste the following link: Anobium - 2015-07-31 Sorry Jacque, We have test and we cannot reproduced this error. We tested using MPASM X 5.51, MPASM 5.42 and MPASM 5.61 (from MPLAB 3.00.02-beta) . Evan If you would like to refer to this comment somewhere else in this project, copy and paste the following link: Jacques Nilo - 2015-07-31 Hi Evan I still have this pb running the 3 lines sample program above. Using MPLAB X IDE V 2.35 Assembly log below Jacques make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf make[1]: Entering directory 'C:/Users/Jacques/MPLABXProjects/t