- Code: Select all
CODEPAGE NAME=page0 START=0x0 END=0x7FF
CODEPAGE NAME=page1 START=0x800 END=0xFFF
CODEPAGE NAME=page2 START=0x1000 END=0x17FF
#IFDEF _DEBUG
CODEPAGE NAME=page3 START=0x1800 END=0x1DFF
CODEPAGE NAME=debug START=0x1E00 END=0x1FFF PROTECTED
#ELSE //no debug
CODEPAGE NAME=page3 START=0x1800 END=0x1FFF
#FI
But the question is, what does that mean? What is it supposed to mean? The affect I am seeing is that I can't have a code segment spanning 01E00. I can have a code segment ending at 1DFF, and another segment starting at 1E00. ( I have a code segment spanning 0x1000)
Language tool versions: MPASMWIN.exe v5.51, mplink.exe v4.49, mplib.exe v4.49
I tried to do a build, and the build failed: I found that I was building in 'debug' mode,
Executing: "C:\..\MPASM Suite\MPASMWIN.exe" /q /p16F946 "myprog.asm" /l"myprog.lst" /e"myprog.err" /d__DEBUG=1 /c- /rDEC
which gave me the error
Error - section '.org_20' can not fit the absolute section. Section '.org_20' start=0x00001800, length=0x000006FA
... and while looking for the problem, I found that the error went away if I started a new section at 1E00:
- Code: Select all
movwf bcorr
bcf status,rp1
bsf status,rp0
movf numl,0
bg sublw 0
org bg+1
movwf numl
movf numh,0
btfss status,c
incf numh,0
sublw 69
This seems an odd meaning for 'protected' ?