I just fell in love with this particular microcontroller, 68hc11 has an amazing architecture.
I'm not an expert but i want to improve, assembly is kinda hard but i want to program this microcontroller.
This assembly code will execute from $100, will allocate a 200-byte array at $800, and will initialize that array with the values 200, 199, … 1. (descending order).
Vreset equ $FFFE
RAM equ $800
ROM equ $100
ARRAY_SIZE equ 200
org RAM
array rmb ARRAY_SIZE
org ROM
Start ldx #array
ldaa #ARRAY_SIZE
Loop staa ,x
inx
deca
bne Loop
bra *
org Vreset
dw Start
I want to get the two highest values from a given array.. i mean, i want to create an array, give 10 values (stored inside an array) and finally obtain the two highest values:
Example:
the array may contain these values:
5 7 9 96 57 58 1 5 6 9
I would like to obtain this output:
96 58
Can help me to do this? I'm kinda lost :/