Hello.
I have a very long code written for 8051 in assembly using Keil, all in a single file. And i want to organize and distribute the functions in multiple files, but can't seem to be able to do it. I tried adding assembly code files using $include but there were errors in compiling it. Like, memory overlapping error was produced even defining 'org' in the included files. so is it done in Keil with assembly?
Example, place your TOGGLELED routine into a separate file, then save it as something like TOGGLELED.INC.
Then, where you want this function code to appear in the main code file, you do -
Code:
#include "TOGGLELED.INC"
You will also need to set the path to the directory where you save your .INC files. You can set it under the "C51" tab of "Flash--->Configure Flash Tools" menu in Keil.