?FC ERROR
Dragon Data Dragon 32/64
Severity: MinorWhat Does This Error Mean?
?FC ERROR on the Dragon means Illegal Function Call — you passed a value outside the acceptable range to a BASIC function. For example, CHR$(300) or POKE with an invalid address. Check the function requirements and correct the argument.
Affected Models
- Dragon 32
- Dragon 64
- Dragon 200E
- XRoar emulator
Common Causes
- CHR$() with a value below 0 or above 255
- POKE with an address outside valid memory range
- PMODE with an invalid mode number
- COLOR with an out-of-range colour value
- Mathematical function given an impossible argument (e.g. SQR of a negative number)
How to Fix It
-
Check the value you passed to the function.
CHR$() accepts 0-255. COLOR accepts values depending on the graphics mode. PMODE accepts 0-4. Make sure your argument is within the valid range.
-
Add a bounds check before calling the function.
Before CHR$(X), add: IF X < 0 OR X > 255 THEN PRINT "OUT OF RANGE" : STOP This prevents the error and helps identify bad values.
-
For PMODE graphics, check you are using the correct mode number.
The Dragon supports PMODE 0 through PMODE 4. Each mode has different resolution and colour limits. PMODE 5 or higher causes ?FC ERROR.
-
Print the variable value before the failing line to debug.
Add PRINT X (or whatever variable is causing the issue) on the line before the error. This shows you the actual value and helps identify why it is out of range.
Frequently Asked Questions
What graphics modes does the Dragon support?
The Dragon supports PMODE 0 through PMODE 4: PMODE 0: 128x96, 2 colours. PMODE 1: 128x96, 4 colours. PMODE 2: 128x192, 2 colours. PMODE 3: 128x192, 4 colours. PMODE 4: 256x192, 2 colours.
Can I run TRS-80 Color Computer programs on the Dragon?
Most CoCo BASIC programs run on the Dragon with little or no modification. The main differences are in the keyboard layout and some hardware addresses for joystick and sound.