Hi I am using a motorola 68hc11 simulator and i have to write this program for a assignment...
I do not even know where to begin with this one.
Question: A buffer is between $3200 and #34FF. WRite a program to
a) Count the number of numbers divided by 13 in the buffer.
b) Make a list of the addresses of these numbers, starting in $3600
c) Store these numbers in a list starting at $3800
and I finished a program for another assignment question, but I have one problem...
Question: There is a set of byte-sized numbers in memory buffer from $3000 to $33cc. WRite a program to move the address of all the numbers in this buffer that are higher in absolute value than %50 into a list starting at $3500.
Answer that i WRote:
ORG $2000 ; code start location in RAM
************
CLRA
CLRB
LDX #$3000 ; load immediate number (#$3000) into X register
LDY #$3500 ; Load immediate number (#$3500) into Y register
Loop LDAB $0,X
CMPB #$32
BLE SMALL
Loop1 STAB 0,Y
INX
INY
CPX #$33CC
BNE Loop
JMP STOP
SMALL CLRB
JMP LOOP1
JMP $8000 ; return to Buffalo ( system program in ROM)
************
* END OF FILE
stop END
problem is that:
the program copies something like
(in decimal)
3000-ono 3500-ono
12 0
34 0
55 55
66 66
77 77
I was wondering if I Could copy all the numbers greater than $50 as a list and not have all this 0s in the middle which correspond to the memories less than $50.
Thanks heaps
I do not even know where to begin with this one.
Question: A buffer is between $3200 and #34FF. WRite a program to
a) Count the number of numbers divided by 13 in the buffer.
b) Make a list of the addresses of these numbers, starting in $3600
c) Store these numbers in a list starting at $3800
and I finished a program for another assignment question, but I have one problem...
Question: There is a set of byte-sized numbers in memory buffer from $3000 to $33cc. WRite a program to move the address of all the numbers in this buffer that are higher in absolute value than %50 into a list starting at $3500.
Answer that i WRote:
ORG $2000 ; code start location in RAM
************
CLRA
CLRB
LDX #$3000 ; load immediate number (#$3000) into X register
LDY #$3500 ; Load immediate number (#$3500) into Y register
Loop LDAB $0,X
CMPB #$32
BLE SMALL
Loop1 STAB 0,Y
INX
INY
CPX #$33CC
BNE Loop
JMP STOP
SMALL CLRB
JMP LOOP1
JMP $8000 ; return to Buffalo ( system program in ROM)
************
* END OF FILE
stop END
problem is that:
the program copies something like
(in decimal)
3000-ono 3500-ono
12 0
34 0
55 55
66 66
77 77
I was wondering if I Could copy all the numbers greater than $50 as a list and not have all this 0s in the middle which correspond to the memories less than $50.
Thanks heaps