diff -urN -X dontdiff jal/jal/assemble.c new_mIII_jal/jal/assemble.c --- jal/jal/assemble.c 2003-09-14 07:33:31.000000000 -0700 +++ new_mIII_jal/jal/assemble.c 2003-11-15 08:19:40.000000000 -0800 @@ -913,7 +913,6 @@ fatal(NULL, (m, "could not create %s", s)); } - fprintf(f, ":020000040000FA\n"); for (i = 0; i != -1;) { int k, n = n_to_write(i); @@ -952,7 +951,7 @@ /* checksum */ fprintf(f, "%02X", (256 - c) & 0xFF); - fprintf(f, "\n"); + fprintf(f, "\r\n"); i += n; } else { @@ -962,7 +961,7 @@ if (i < eeprom_start) { i = eeprom_start; if (target_cpu == pic_16) { - fprintf(f, ":0200000400F00A\n"); + fprintf(f, ":0200000400F00A\r\n"); } } else if (i > eeprom_start + eeprom_index) { i = -1; @@ -990,11 +989,7 @@ checksum_add(&c, 0xFE); checksum_add(&c, 0x00); } else if (target_cpu == pic_14) { - fprintf(f, ":02400E00"); - checksum_add(&c, 0x02); - checksum_add(&c, 0x40); - checksum_add(&c, 0x0E); - checksum_add(&c, 0x00); + ignore = 1; } else { ignore = 1; } @@ -1009,13 +1004,13 @@ checksum_add(&c, 0x00); } if (!ignore) - fprintf(f, "%02X\n", low(256 - c) + fprintf(f, "%02X\r\n", low(256 - c) ); if (target_cpu == pic_16) { - fprintf(f, ":020000040030CA\n"); - fprintf(f, ":0E00000000220C0E000180000FC00FE00F4028\n"); + fprintf(f, ":020000040030CA\r\n"); + fprintf(f, ":0E00000000220C0E000180000FC00FE00F4028\r\n"); } - fprintf(f, ":00000001FF\n"); + fprintf(f, ":00000001FF\r\n"); fclose(f); } @@ -1294,7 +1289,7 @@ + (config_osc == osc_lp ? 0x0000 : 0x0000); if ((target_chip == t_16f877) || (target_chip == t_16f876) || (target_chip == t_16f873)) { /* Added 16f876 & 16f873 by Javi 2003-03-01 */ - config = 0x3F72; + config = 0x000; } if (target_chip == t_16f88) { config = 0x3F72; @@ -1348,8 +1343,6 @@ } else if ((target_chip == t_16f877) || (target_chip == t_16f876) || (target_chip == t_16f873)) { /* Added 16f876 & 16f873 by Javi 2003-03-01 */ - fprintf(assembler_file, " __CONFIG H'3F72' \n"); - } else if (target_cpu == pic_16) { /* fprintf( assembler_file, "; __CONFIG H'3F72' \n" ); */ diff -urN -X dontdiff jal/jal/codegen.c new_mIII_jal/jal/codegen.c --- jal/jal/codegen.c 2003-10-23 17:37:59.000000000 -0700 +++ new_mIII_jal/jal/codegen.c 2003-11-15 08:19:38.000000000 -0800 @@ -1560,17 +1560,31 @@ /* combine it all */ interrupt_label = new_label(NULL, "__interrupt", 0, ""); main_label = new_label(NULL, "__main", 0, ""); + if (target_cpu == sx_12) { (*p) = - new_chain6(((target_cpu == sx_12) ? - new_chain4(new_org(0), - new_asm(NULL, opcode_goto, interrupt_label, 0), new_org(1), - new_asm(NULL, opcode_goto, main_label, 0)) : -/* new_chain4(new_org(target_origin + 0), new_asm(NULL, opcode_goto, main_label, 0), new_org(4),*/ - new_chain4(new_org(target_origin + 0), new_asm(NULL, opcode_goto, main_label, 0), new_org(target_origin + 4), - code_interrupt_header(interrupt_label))), + new_chain6( new_chain4(new_org(0), + new_asm(NULL, opcode_goto, interrupt_label, 0), new_org(1), + new_asm(NULL, opcode_goto, main_label, 0)), new_chain2(new_org(transfer_start()), transfers), first_page_routines, call_vectors, new_chain3(interrupt_label, interrpt, code_interrupt_trailer()), new_chain2(main_label, main)); + } else if (target_cpu == pic_14) { + (*p) = + new_chain6(( new_chain4(new_org(target_origin + 3), + new_asm(NULL, opcode_goto, main_label, 0), new_org(target_origin + 4), + code_interrupt_header(interrupt_label))), + new_chain2(new_org(transfer_start()), transfers), first_page_routines, + call_vectors, new_chain3(interrupt_label, interrpt, code_interrupt_trailer()), + new_chain2(main_label, main)); + } else { + (*p) = + new_chain6(( new_chain4(new_org(target_origin + 0), + new_asm(NULL, opcode_goto, main_label, 0), new_org(target_origin + 4), + code_interrupt_header(interrupt_label))), + new_chain2(new_org(transfer_start()), transfers), first_page_routines, + call_vectors, new_chain3(interrupt_label, interrpt, code_interrupt_trailer()), + new_chain2(main_label, main)); + } total_code_size = code_size(*p); }