Implementasi Algoritma Bubble Sort Untuk Ekstraksi Kode Biner Pada Intel Hex File
Keywords:Bubble sort, Hex file, Microprocessor, Microcontroller, Sdcc
The .hex file generated by the small device c compiler (sdcc) consists of unsorted offset addresses yielding the binary code will be misplaced when extracted and applied to an eprom programmer or chip programmer on non-commercially product. This study aims to implement a bubble sort algorithm to sort rows in a .hex file generated by sdcc based on its address offsets. The work is carried by writing and developing an application program using the Delphi compiler and the Pascal language program. Sorting procedure started by copying the contents of the source .hex file to the ram memory through finally making a copy of the source file to yield the target .hex file. The test takes 2 (two) .hex files as input and creates a target .hex file as the output of the program. Results show that the contents of the created target .hex file have been descendingly arranged according to the offset address. Binary code arrangement is crucial since the misplaced data during the burning or loading process on the microprocessor or microcontroller could cause failure in program execution.