Aha! The missing link between the source line numbering and the assembly code addresses was to add the -g flag to generate stabs directives in the assembly .s file. See https://www.danlj.org/mkj/lad/info/stabs.html for more details. With that given, we now have: Line 22863 et seq: _SHOW_NUM: ; .stabd 68,0,8291 LFBB2: pshs u ; leas -5,s ;,, leau ,x ; num, num stb 3,s ; absx, absx ldb 9,s ; absy, absy ; .stabd 68,0,8297 ldx 10,s ; scale, scale lbne L35 ; ; .stabd 68,0,8303 The filename can be extracted from the last .stabs directive, eg: ; .stabs "source/main.c",132,0,0,Ltext2 - if the last .stabs filename was not the one we're interested in (i.e. main.c) then don't output the code that follows the .stabd directive. ------------------------------------------------------------------------------------------------------- In tailgunner.map: 5A79 A$main$22792 main.c ------------------------------------------------------------------------------------------------------- In main.lst, lines 22970-22971: 5A21 22791 _SHOW_NUM: 5A21 34 40 [ 6]22792 pshs u ; Later in main.lst in "Symbol Table": 4 A$main$22792 5A21 GR | 4 A$main$22793 5A23 GR ------------------------------------------------------------------------------------------------------- In main.rst, lines 22790-22792: 5A79 22791 _SHOW_NUM: 5A79 34 40 [ 6]22792 pshs u ; 5A7B 32 7B [ 5]22793 leas -5,s ;,, In main.s, lines 22791-22792: _SHOW_NUM: pshs u ; ------------------------------------------------------------------------------------------------------- In main.s, line 22791-22792: _SHOW_NUM: pshs u ; ------------------------------------------------------------------------------------------------------- In main.i, line 2294: # 1007 "source/main.c" static const int8 MINUS[] = { 0 , ((int8)8), ((int8)4), (int8)-1 , ((int8)0), ((int8)14), 0 , ((int8)-8), ((int8)4), 1 }; static void SHOW_MINUS(void) { Draw_VLp((int8 *)(MINUS)); } static const int8 SCORE[] = { (int8)-1 , ((int8)0), ((int8)16), (int8)-1 , ((int8)12), ((int8)0), ... In main.i, line 9579: (corresponds with # 8291 "source/main.c" (1007-2294+9579-1) {-1 for "# 1007 "source/main.c"}) static void SHOW_NUM(int16 num, int8 absx, int8 absy, uint16 scale) { ------------------------------------------------------------------------------------------------------- In source/main.c, line 8291: static void SHOW_NUM(int16 num, int8 absx, int8 absy, uint16 scale) { // left-aligned -------------------------------------------------------------------------------------------------------