Exact match. Not showing close matches.
PICList
Thread
'[PIC]: Motorola assembly instructions'
2001\01\24@202406
by
Drew Vassallo
Hey,
I'm trying to port some code over to the PIC from a Motorola 68HC series
chip (ugh). Anyone have an instruction set that I can reference for this?
It's tough to make out the instructions, as they really don't relate
directly to PIC assembly.
Thanks.
--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\24@210025
by
yansong gu
Hi all
I am missing the diskette for "dissecting dos" book by podanoffsky, if
anyone would not mind sending me a copy I would be very thankful.
Yansong
{Original Message removed}
2001\01\24@222035
by
Bill Westfield
I'm trying to port some code over to the PIC from a Motorola 68HC series
chip (ugh). Anyone have an instruction set that I can reference for this?
You haven't given enough numbers to specify an instuction set yet. There
are (roughly) 68HC00, 68HC05, 68HC08, MC6809, 68HC11 and 68HC12 in the
"small microcontroller" range, all with significant architectural
differences (I think some or all might be considered by some to be "logical
extensions" of one another.) Then you get to the 68HC000 and later
higher-powered microprocessors...
In any case, all the databooks are online at http://www.mot-sps.com/
BillW
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\25@005714
by
Douglas Wood
2001\01\25@055213
by
Morgan Olsson
Drew Vassallo wrote:
>Hey,
>
>I'm trying to port some code over to the PIC from a Motorola 68HC series
>chip (ugh).
Dirty and nonoptimal executing codespace and ramspace... but maybe less work and full compatible and safe, if: you can create macros named exactly as the 68xx instructions, and then just paste the original code??
Macros use file register for A, X SP and stack etc.
OK, timing goes out the door, and of course rewrite pheripheral use, investigate call stack depth, etc.
Just a quick idea...
Regards
/Morgan
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspam
@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\01\26@124122
by
Spehro Pefhany
|
At 08:24 PM 1/24/01 -0500, you wrote:
>Hey,
>
>I'm trying to port some code over to the PIC from a Motorola 68HC series
>chip (ugh). Anyone have an instruction set that I can reference for this?
>It's tough to make out the instructions, as they really don't relate
>directly to PIC assembly.
I presume you've downloaded the technical manuals for the relevant 68HC
chip from Motorola's web site. It's all in there.
The Motorola CPUs are generally a bit more capable than the PIC, so
you may find you need a few more instructions here and there to handle
things like multiple precision math.
Probably the overall organization of the program is ok, but it might
be better to rewrite each subroutine in PIC assembler rather than
trying to go instruction-by-instruction. Might make sense to change
byte order in some cases as well.
The Motorola CPUs also allow execution of code in RAM, manipulation
of the stack (generally) and so on, which have no direct equivalent
in the lower end PICs, so the difficulty of the code can vary by
how the original program was written.
Best regards,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..." "The Journey is the reward"
speff
KILLspaminterlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspam
.....mitvma.mit.edu
2001\01\29@123526
by
Alice Campbell
|
Here are some macros i've been using and fiddling with. They
are not complete, and a few might not even be right, but it
would get you started:
alice
;motmacro.asm
list p=16c84
radix dec
#include p16c84.inc
__CONFIG _LP_OSC & _WDT_OFF &_PWRTE_ON & _CP_OFF
;----------------------------------------------------
;cpu equates (memory map)
status equ 0x03
porta equ 0x05
portb equ 0x06
trisa equ 0x85
trisb equ 0x86
;yes i know, but i hate uppercase.
cblock 0x10
temp
tempa
wtemp
answer
endc
c = 0
z = 2
w = 0 ;work reg
f = 1 ;file reg
_pd = 3
_to = 4
;-----------------------------------------------------
org 0x00
nop ;this program is mostly used in simulator.
goto tryout
;------------------------------------------------------
;various macros in no particular order
;macro area
;compare literal in work
cmpl macro value ;nondestructive
movwf wtemp
sublw value
swapf wtemp,f
swapf wtemp,w
endm
;compare file in work
cmpf macro file
movwf wtemp
movfw file
subwf wtemp,w
endm
;branch not equal
bne MACRO fr1,fr2,address
movf fr2,W
subwf fr1,W
btfss 3,2
goto address
ENDM
;branch if equal
beq MACRO fr1,fr2,address
movf fr2,W
subwf fr1,W
btfsc 3,2
goto address
ENDM
;branch if less
blo macro address
btfss status,c
goto address
endm
;branch if higher
bhi macro address
btfsc status,c
goto address
ENDM
;branch if plus-- test bit 7 set
bpl macro file,address ;????
movfw file
andlw b'10000000'
btfsc status,z
goto address
ENDM
;branch if minus-- test bit 7 set
bmi macro file,address ;????
movfw file
andlw b'10000000'
btfss status,z
goto address
ENDM
;branch less than or same
bls MACRO fr1,fr2,address
movf fr1,W
subwf fr2,W
btfsc 3,0
goto address
ENDM
bhs MACRO fr1,fr2,address
movf fr2,W
subwf fr1,W
btfsc 3,0
goto address
ENDM
cmp macro file
movwf wtemp
movfw file
subwf wtemp,w
endm
txa MACRO address
movfw indf
ENDM
ldx MACRO address
movwf fsr
ENDM
atx MACRO address
movfw indf
ENDM
ldaf MACRO address
movfw address
ENDM
ldal MACRO L
movlw L
ENDM
bra MACRO address
goto address
ENDM
rts MACRO
RETURN
ENDM
sta MACRO address
movwf address
ENDM
jsr MACRO address
call address
EMDM
jmp MACRO address
goto address
ENDM
sub MACRO address,fr1 ;CHECK THAT FILE SUBTRACTS FROM
WORK
movfw fr1
subwf address,F
ENDM
nega MACRO
MOVWF wtemp
comf wtemp,w
ENDM
stx MACRO
movwf fsr
ENDM
;sta movwf whatever
sbc MACRO address
subwf address, F
ENDM
subw MACRO address
subwf address,f
ENDM
;----------------------------------------------------
tryout
movlw .8
movwf tempa
movlw .8
movwf temp
movlw .5
nop
cmp tempa
bhi true
; bne temp,tempa,true
; movwf answer
false
stopit goto stopit
true
orbit goto orbit
;----------------------------------------
end
;%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\29@173141
by
Barry Gershenfeld
>Here are some macros i've been using and fiddling with. They
>are not complete, and a few might not even be right, but it
>would get you started:
>
>alice
>sub MACRO address,fr1 ;CHECK THAT FILE SUBTRACTS FROM
>WORK
> movfw fr1
> subwf address,F
> ENDM
>
Was that comment a "note to self"? 'Cuz I checked my wall (I have
it tacked to the wall since there's no way to make sense of it) and
it says SUBWF does f - w !!
Barry
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\29@184239
by
Alice Campbell
> >Here are some macros i've been using and fiddling with. They
> >are not complete, and a few might not even be right, but it
> >would get you started:
> >
> >alice
>
> >sub MACRO address,fr1 ;CHECK THAT FILE SUBTRACTS FROM
> >WORK
> > movfw fr1
> > subwf address,F
> > ENDM
> >
>
> Was that comment a "note to self"? 'Cuz I checked my wall (I have
> it tacked to the wall since there's no way to make sense of it) and
> it says SUBWF does f - w !!
yes, thanks Barry, you have sharp eyes. i always have to
look that one up or run it through the simulator to see if i
get what i think i want. this was snipped from a work in
progress, that still has some distane to go.
alice
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
More... (looser matching)
- Last day of these posts
- In 2001
, 2002 only
- Today
- New search...