Skip to content

Commit c641c56

Browse files
committed
Write jump instructions in little endian
1 parent 5b35acf commit c641c56

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014 Drew DeVault
1+
Copyright (c) 2014 The KnightOS Group
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ void load_config() {
119119
} // config lines
120120
}
121121

122-
void load_symbols()
123-
{
122+
void load_symbols() {
124123
int comment, sym_not_found;
125124
char buf[256], sym[256];
126125
unsigned short address;
@@ -190,8 +189,8 @@ int main(int argc, char **argv) {
190189

191190
for (ent = context.symbols; ent; ent = ent->next) {
192191
fputc(0xC3, context.rom);
193-
fputc(ent->address >> 8, context.rom);
194192
fputc(ent->address & 0xff, context.rom);
193+
fputc(ent->address >> 8, context.rom);
195194
fseek(context.rom, -6, SEEK_CUR);
196195
printf(".equ %s 0x%.2hX%.2hX\n", ent->symbol, index++, context.page);
197196
}

0 commit comments

Comments
 (0)