English 中文(简体)
目前PC 0xc7没有发现源代码线。 利用方案记忆,看看教学法失灵
原标题:No source code lines were found at current PC 0xc7. Use Program memory view to see instruction code disassembly

我说,新字可以集思,我写了一个简单的学习方案。 我认为,我会遇到一个“去”教学的反方案问题。 我使用一种事先知情同意10f202,我使用MPLAB诉6.15的模拟模式来推翻我的代码。 我的守则如下:

PROCESSOR 10f202

#include <xc.inc>

; CONFIG
  CONFIG  WDTE = OFF            ; Watchdog Timer (WDT disabled)
  CONFIG  CP = OFF              ; Code Protect (Code protection off)
  CONFIG  MCLRE = OFF           ; Master Clear Enable (GP3/MCLR pin fuction is digital I/O, MCLR internally tied to VDD)

PSECT resetVect, class=CODE, delta=2
resetVect:
    PAGESEL main
    goto main
    
PSECT code, delta=2
main:
    clrf GPIO           ; clrf GPIO, F
    movlw   0b0001000       ; configure GP1 (only) as an output
    tris    GPIO
    
loop:
    bcf GPIO,0
    bsf GPIO,0
    movlw 256
    movwf 0x10
    nop
    goto loop
    
END resetVect

该方案从方案记忆1F6(第503条)开始,指示“主线”。 它执行所有代码项目,但当它达到“goto loop”指示时,方案记忆线1FF没有显示“goto loop”指示,然后,方案记忆线0c7没有指示。 它没有回到“全球知识分子”计划中。

https://i.stack.imgur.com/LHKdh.png”rel=“nofollow noreferer”> 方案记忆

At first I was using a "call" instruction to call the subroutine "loop" with a return instruction but I was getting the error message that the instruction return was an illegal instruction for this PIC 10F202. I had an old assembly code that work before with "goto" instruction but this code was compiled with the old compiler from MPLAB: MPASM. In this code (using the same PIC 10f202) I used goto and call instructions and it compiled fine. Thanks for helping! Dominique

问题回答

你们使用的控制器(PIC10F202)是一种受限资源装置。

只有一个密码,从电话中取回RETLW 0x00至0xFF

这总是在《世界登记册》中设定字面价值。

这一控制器中还有其他几个“女性”,因此难以为其制定法典。 例如:

  • call stack is two levels deep
  • no interrupts
  • called function must begin at an address between 0x000 and 0x0FF

还有很多人,我怀疑,学习用视像工具链书写装配法将非常令人沮丧。

“MPLABX”项目“我为你创建”:

In your question you said:

我有一部旧的《集会法》,在进行“戈托”指示之前工作,但该法典是同来自马普西人解的老编编汇编的。 在这项法典中(使用相同的事先知情同意10f202)。 我使用了行文和打电话指示,并汇编了罚款。

The reason this fails when building your code with the pic-as tool is kind of complicated, I ll try to be brief. It involves how this specific family of controllers keeps track of the factory calibration value for the internal oscillator.

Microchip writes the calibration value as a MOVLW n opcode as the last instruction word in the program memory space. When an application locates an instruction in this location too it will be overwritten by the device programming tool with the factory calibration value.

What this means for you is that your application should not use this location. As you have seen the last instruction of your application is a GOTO that got overwritten because it was located at address 0x1FF of the PIC10F202 controller.

www.un.org/Depts/DGACM/index_spanish.htm 着手根据2023-JAN-16号评论扩大这一答复基础。

The PIC10F2xx family of controllers are implemented based on the way the first 12-bit instruction word controller (PIC16C54).

在控制器中不存在内部束缚器,必须与外部晶体、温室或驻地协调员电路连接。

This controller has 512 instruction words, 2-level call stack, no interrupts, one timer and 25 bytes of RAM.

微芯片的精髓和上帝像智慧一样,把电离层的地址作为记忆中的最后指示,因为所谓的功能必须从0x000至0x0FF的地址开始。 表中称为零页。

When an internal oscillator is implemented a few years later the clever clogs at Microchip thought is would be a spiffy idea to store the oscillator calibration constant in the last instruction word instead of a GOTO to the POR entry of the application. Now address 0x000 is the "default" POR reset after executing one `MOVLW to load the oscillator factory calibration value.

I have a long rant about the stupid way factory calibration values are stored in some of the 14-bit instruction word controllers. Not needed here.

我的项目以这种方式加以实施,以提醒我,这一具体控制器的nut子是,当设计工具是密码空间的最后工作时,装置设计工具将超过应用的最后指示词,而实际的POR地址不是0x000。

当我们的XC8汇编者与这一控制者一道工作时,所有这一切都是隐蔽的。

Keep in mind that Microchip really does not like developers that create applications in assembly language.

感谢你的法典。 非常感谢。

据提及,从PIC10f202的数据表来看,有效重新定位病媒为零,01FFh的位置包含内部锁定器校准值(第4.2页,第12页),这一数值永远不应过高。 在你的代码上,重新定位的病媒位于01FFh(主机=01FFh)。 当我以模拟方式管理你的法典时,节目记忆中的一切都处于适当位置:妇女、青年和体育部位于01FFh,妇女、青年和体育部位于0时。

我认为,如图4-2第12页所示,在数据表中提及的校长与有效主子之间有着根本的区别。

感谢帮助我理解这一差异。





相关问题
List of suspected Malicious patterns

I am doing an anti-virus project by disassembling its code and analyzing it. So I want a list of the Suspected Malicious pattern codes, so I can observe which is suspected and which is not? So I want ...

Prefetch for Intel Core 2 Duo

Has anyone had experience using prefetch instructions for the Core 2 Duo processor? I ve been using the (standard?) prefetch set (prefetchnta, prefetcht1, etc) with success for a series of P4 ...

How are mutex and lock structures implemented?

I understand the concept of locks, mutex and other synchronization structures, but how are they implemented? Are they provided by the OS, or are these structures dependent on special CPU instructions ...

Installing GNU Assembler in OSX

No matter how hard I google, I can t seem to find a (relatively) easy-to-follow instruction on how to install the GNU Assembler on a mac. I know I can use gcc -c (Apple Clang on a Mac) to assemble .s ...

8086 assembler,INT 16,2

I got stuck at this thing,I want to see if right shift button has been pressed,so I have this assambler code: mov ah,2 int 16h ;calling INT 16,2 - Read Keyboard Flags interrupt mov ah,...

Translate a FOR to assembler

I need to translate what is commented within the method, to assembler. I have a roughly idea, but can t. Anyone can help me please? Is for an Intel x32 architecture: int secuencia ( int n, ...

热门标签