These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

Out of Pod Experience

 
  • Topic is locked indefinitely.
 

68HC11 programming

Author
JunkRaider
Deep Core Mining Inc.
Caldari State
#1 - 2012-01-13 18:40:33 UTC
Hi all, I recently started taking a course called microprocessors and it involves a lot of programming, which is a new field for me. As you've guessed, it's pretty tough and I can't seem to get my head around the logic. We currently use hexadecimal notations to write our programs and the textbook I'm using is not comprehensive enough for me.
I have a few questions due next week that I'm working on. We are asked to write a program that transfers 400bytes of memory from $C000 to $D000. This is what I've been able to come up with but it's not working as intended.

LDX #0X3000
LDY #0X4000
LDAB 0190
LOOP:
LDAA 0X00,X
STAA 0X00,Y
INX
INY
CPX 0190
BNE LOOP
BRA

so, I've been told that this will only count to 256 instead of 400. I've tried to do some research and there isn't any material out there that does it justice. Any help will be appreciated.
Kattshiro
Deep Core Mining Inc.
Caldari State
#2 - 2012-01-13 19:24:14 UTC
What language? Assembly? Some people might know, but i'd say you'd have better luck on coding forum somewhere. Or heaven forbid tell the teacher you or your parents are paying money to and ask for help.
Barakkus
#3 - 2012-01-13 21:25:23 UTC
Kattshiro wrote:
What language? Assembly? Some people might know, but i'd say you'd have better luck on coding forum somewhere. Or heaven forbid tell the teacher you or your parents are paying money to and ask for help.


Yes, it is assembler, which is what you study when taking a course on microprocessors :P

http://youtu.be/yytbDZrw1jc

stoicfaux
#4 - 2012-01-13 21:45:59 UTC  |  Edited by: stoicfaux
LDAB 0190 or LDAB #$0190?

edit: http://carprogrammer.com/Z28/PCM/disassembly/Intro%20to%2068HC11%20Programming.htm

edit2: And shouldn't "CPX 0190" really be along the lines of CPX $0190 + $3000?

edit3: How about?
LDAB #$0190
...
DECB
...
CMPB #0

Pon Farr Memorial: once every 7 years, all the carebears in high-sec must PvP or they will be temp-banned.

Atticus Fynch
#5 - 2012-01-13 22:15:46 UTC
Kattshiro wrote:
Or heaven forbid tell the teacher you or your parents are paying money to and ask for help.


There are "teachers" that cant teach to save their lives. They are often just "supervisors" leaving you to your own devices and yet drawing a paycheck becuase their "degree" says they can.

[b]★★★Cargo Pilots Unite!!!★★★ https://forums.eveonline.com/default.aspx?g=posts&m=668132&#post668132[/b]

Caleidascope
Republic Military School
Minmatar Republic
#6 - 2012-01-14 03:46:33 UTC
Yeah, it is assembly. I had similar class, but we did intel chips instead of Motorola.

The way I see it, you will have a loop. You know your starting address, you know how many bytes you need to copy, together these two pieces of information tells you the last address, all you have to do now is make a loop that would keep copying the bytes until last address is filled, then terminate.

Or you can do it manually, just a lot of copy commands to copy contents of address in C to addresses in D one at a time.

Life is short and dinner time is chancy

Eat dessert first!

JunkRaider
Deep Core Mining Inc.
Caldari State
#7 - 2012-01-14 03:50:43 UTC
stoicfaux wrote:
LDAB 0190 or LDAB #$0190?

edit: http://carprogrammer.com/Z28/PCM/disassembly/Intro%20to%2068HC11%20Programming.htm

edit2: And shouldn't "CPX 0190" really be along the lines of CPX $0190 + $3000?

edit3: How about?
LDAB #$0190
...
DECB
...
CMPB #0

I see what you did there. I'll see if it works.