;### Copyright 2025 Tadashi G. Takaoka
;###
;### Licensed under the Apache License, Version 2.0 (the "License");
;### you may not use this file except in compliance with the License.
;### You may obtain a copy of the License at
;###
;###     http://www.apache.org/licenses/LICENSE-2.0
;###
;### Unless required by applicable law or agreed to in writing, software
;### distributed under the License is distributed on an "AS IS" BASIS,
;### WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;### See the License for the specific language governing permissions and
;### limitations under the License.

;;; MC68851 move
        pmove   d2,tc
        pmove   d2,cal
        pmove   d2,val
        pmove   d2,scc
        pmove   d2,ac
        pmove   d2,psr
        pmove   d2,pcsr
        pmove   d2,bad0
        pmove   d2,bad7
        pmove   d2,bac0
        pmove   d2,bac7
        pmove.l a2,tc
        pmove.b a2,cal
        pmove.b a2,val
        pmove.b a2,scc
        pmove.w a2,ac
        pmove.w a2,psr
        pmove.w a2,pcsr
        pmove.w a2,bad0
        pmove.w a2,bad7
        pmove.w a2,bac0
        pmove.w a2,bac7
        pmove.l (a2),tc
        pmove.q (a2),drp
        pmove.q (a2),srp
        pmove.q (a2),crp
        pmove.b (a2),cal
        pmove.b (a2),val
        pmove.b (a2),scc
        pmove.w (a2),ac
        pmove.w (a2),psr
        pmove.w (a2),pcsr
        pmove.w (a2),bad0
        pmove.w (a2),bad7
        pmove.w (a2),bac0
        pmove.w (a2),bac7
        pmove.l (a2)+,tc
        pmove.q (a2)+,drp
        pmove.q (a2)+,srp
        pmove.q (a2)+,crp
        pmove.b (a2)+,cal
        pmove.b (a2)+,val
        pmove.b (a2)+,scc
        pmove.w (a2)+,ac
        pmove.w (a2)+,psr
        pmove.w (a2)+,pcsr
        pmove.w (a2)+,bad0
        pmove.w (a2)+,bad7
        pmove.w (a2)+,bac0
        pmove.w (a2)+,bac7
        pmove.l -(a2),tc
        pmove.q -(a2),drp
        pmove.q -(a2),srp
        pmove.q -(a2),crp
        pmove.b -(a2),cal
        pmove.b -(a2),val
        pmove.b -(a2),scc
        pmove.w -(a2),ac
        pmove.w -(a2),psr
        pmove.w -(a2),pcsr
        pmove.w -(a2),bad0
        pmove.w -(a2),bad7
        pmove.w -(a2),bac0
        pmove.w -(a2),bac7
        pmove.l ($1234,a2),tc
        pmove.q ($1234,a2),drp
        pmove.q ($1234,a2),srp
        pmove.q ($1234,a2),crp
        pmove.b ($1234,a2),cal
        pmove.b ($1234,a2),val
        pmove.b ($1234,a2),scc
        pmove.w ($1234,a2),ac
        pmove.w ($1234,a2),psr
        pmove.w ($1234,a2),pcsr
        pmove.w ($1234,a2),bad0
        pmove.w ($1234,a2),bad7
        pmove.w ($1234,a2),bac0
        pmove.w ($1234,a2),bac7
        pmove.l ($34,a2,d3.w),tc
        pmove.q ($34,a2,d3.w),drp
        pmove.q ($34,a2,d3.w),srp
        pmove.q ($34,a2,d3.w),crp
        pmove.b ($34,a2,d3.w),cal
        pmove.b ($34,a2,d3.w),val
        pmove.b ($34,a2,d3.w),scc
        pmove.w ($34,a2,d3.w),ac
        pmove.w ($34,a2,d3.w),psr
        pmove.w ($34,a2,d3.w),pcsr
        pmove.w ($34,a2,d3.w),bad0
        pmove.w ($34,a2,d3.w),bad7
        pmove.w ($34,a2,d3.w),bac0
        pmove.w ($34,a2,d3.w),bac7
        pmove.l ($1234).w,tc
        pmove.q ($1234).w,drp
        pmove.q ($1234).w,srp
        pmove.q ($1234).w,crp
        pmove.b ($1234).w,cal
        pmove.b ($1234).w,val
        pmove.b ($1234).w,scc
        pmove.w ($1234).w,ac
        pmove.w ($1234).w,psr
        pmove.w ($1234).w,pcsr
        pmove.w ($1234).w,bad0
        pmove.w ($1234).w,bad7
        pmove.w ($1234).w,bac0
        pmove.w ($1234).w,bac7
        pmove.l ($12345678).l,tc
        pmove.q ($12345678).l,drp
        pmove.q ($12345678).l,srp
        pmove.q ($12345678).l,crp
        pmove.b ($12345678).l,cal
        pmove.b ($12345678).l,val
        pmove.b ($12345678).l,scc
        pmove.w ($12345678).l,ac
        pmove.w ($12345678).l,psr
        pmove.w ($12345678).l,pcsr
        pmove.w ($12345678).l,bad0
        pmove.w ($12345678).l,bad7
        pmove.w ($12345678).l,bac0
        pmove.w ($12345678).l,bac7
        pmove.l (*+$1234,pc),tc
        pmove.q (*+$1234,pc),drp
        pmove.q (*+$1234,pc),srp
        pmove.q (*+$1234,pc),crp
        pmove.b (*+$1234,pc),cal
        pmove.b (*+$1234,pc),val
        pmove.b (*+$1234,pc),scc
        pmove.w (*+$1234,pc),ac
        pmove.w (*+$1234,pc),psr
        pmove.w (*+$1234,pc),pcsr
        pmove.w (*+$1234,pc),bad0
        pmove.w (*+$1234,pc),bad7
        pmove.w (*+$1234,pc),bac0
        pmove.w (*+$1234,pc),bac7
        pmove.l (*+52,pc,d3.l),tc
        pmove.q (*+52,pc,d3.l),drp
        pmove.q (*+52,pc,d3.l),srp
        pmove.q (*+52,pc,d3.l),crp
        pmove.b (*+52,pc,d3.l),cal
        pmove.b (*+52,pc,d3.l),val
        pmove.b (*+52,pc,d3.l),scc
        pmove.w (*+52,pc,d3.l),ac
        pmove.w (*+52,pc,d3.l),psr
        pmove.w (*+52,pc,d3.l),pcsr
        pmove.w (*+52,pc,d3.l),bad0
        pmove.w (*+52,pc,d3.l),bad7
        pmove.w (*+52,pc,d3.l),bac0
        pmove.w (*+52,pc,d3.l),bac7
        pmove.l #$12345678,tc
        pmove.q #$123456789abcdef0,drp
        pmove.q #$123456789abcdef0,srp
        pmove.q #$123456789abcdef0,crp
        pmove.b #$34,cal
        pmove.b #$34,val
        pmove.b #$34,scc
        pmove.w #$1234,ac
        pmove.w #$1234,psr
        pmove.w #$1234,pcsr
        pmove.w #$1234,bad0
        pmove.w #$1234,bad7
        pmove.w #$1234,bac0
        pmove.w #$1234,bac7
        pmove   d2,tc
        pmove   d2,cal
        pmove   d2,val
        pmove   scc,d2
        pmove   ac,d2
        pmove   psr,d2
        pmove   pcsr,d2
        pmove   bad0,d2
        pmove   bad7,d2
        pmove   bac0,d2
        pmove   bac7,d2
        pmove.l tc,a2
        pmove.b cal,a2
        pmove.b val,a2
        pmove.b scc,a2
        pmove.w ac,a2
        pmove.w psr,a2
        pmove.w pcsr,a2
        pmove.w bad0,a2
        pmove.w bad7,a2
        pmove.w bac0,a2
        pmove.w bac7,a2
        pmove.l tc,(a2)
        pmove.q drp,(a2)
        pmove.q srp,(a2)
        pmove.q crp,(a2)
        pmove.b cal,(a2)
        pmove.b val,(a2)
        pmove.b scc,(a2)
        pmove.w ac,(a2)
        pmove.w psr,(a2)
        pmove.w pcsr,(a2)
        pmove.w bad0,(a2)
        pmove.w bad7,(a2)
        pmove.w bac0,(a2)
        pmove.w bac7,(a2)
        pmove.l tc,(a2)+
        pmove.q drp,(a2)+
        pmove.q srp,(a2)+
        pmove.q crp,(a2)+
        pmove.b cal,(a2)+
        pmove.b val,(a2)+
        pmove.b scc,(a2)+
        pmove.w ac,(a2)+
        pmove.w psr,(a2)+
        pmove.w pcsr,(a2)+
        pmove.w bad0,(a2)+
        pmove.w bad7,(a2)+
        pmove.w bac0,(a2)+
        pmove.w bac7,(a2)+
        pmove.l tc,-(a2)
        pmove.q drp,-(a2)
        pmove.q srp,-(a2)
        pmove.q crp,-(a2)
        pmove.b cal,-(a2)
        pmove.b val,-(a2)
        pmove.b scc,-(a2)
        pmove.w ac,-(a2)
        pmove.w psr,-(a2)
        pmove.w pcsr,-(a2)
        pmove.w bad0,-(a2)
        pmove.w bad7,-(a2)
        pmove.w bac0,-(a2)
        pmove.w bac7,-(a2)
        pmove.l tc,($1234,a2)
        pmove.q drp,($1234,a2)
        pmove.q srp,($1234,a2)
        pmove.q crp,($1234,a2)
        pmove.b cal,($1234,a2)
        pmove.b val,($1234,a2)
        pmove.b scc,($1234,a2)
        pmove.w ac,($1234,a2)
        pmove.w psr,($1234,a2)
        pmove.w pcsr,($1234,a2)
        pmove.w bad0,($1234,a2)
        pmove.w bad7,($1234,a2)
        pmove.w bac0,($1234,a2)
        pmove.w bac7,($1234,a2)
        pmove.l tc,($34,a2,d3.w)
        pmove.q drp,($34,a2,d3.w)
        pmove.q srp,($34,a2,d3.w)
        pmove.q crp,($34,a2,d3.w)
        pmove.b cal,($34,a2,d3.w)
        pmove.b val,($34,a2,d3.w)
        pmove.b scc,($34,a2,d3.w)
        pmove.w ac,($34,a2,d3.w)
        pmove.w psr,($34,a2,d3.w)
        pmove.w pcsr,($34,a2,d3.w)
        pmove.w bad0,($34,a2,d3.w)
        pmove.w bad7,($34,a2,d3.w)
        pmove.w bac0,($34,a2,d3.w)
        pmove.w bac7,($34,a2,d3.w)
        pmove.l tc,($1234).w
        pmove.q drp,($1234).w
        pmove.q srp,($1234).w
        pmove.q crp,($1234).w
        pmove.b cal,($1234).w
        pmove.b val,($1234).w
        pmove.b scc,($1234).w
        pmove.w ac,($1234).w
        pmove.w psr,($1234).w
        pmove.w pcsr,($1234).w
        pmove.w bad0,($1234).w
        pmove.w bad7,($1234).w
        pmove.w bac0,($1234).w
        pmove.w bac7,($1234).w
        pmove.l tc,($12345678).l
        pmove.q drp,($12345678).l
        pmove.q srp,($12345678).l
        pmove.q crp,($12345678).l
        pmove.b cal,($12345678).l
        pmove.b val,($12345678).l
        pmove.b scc,($12345678).l
        pmove.w ac,($12345678).l
        pmove.w psr,($12345678).l
        pmove.w pcsr,($12345678).l
        pmove.w bad0,($12345678).l
        pmove.w bad7,($12345678).l
        pmove.w bac0,($12345678).l
        pmove.w bac7,($12345678).l
;;; MC68851 branch
        pbbs    *+$1234
        pbbc    *+$1234
        pbls    *+$1234
        pblc    *+$1234
        pbss    *+$1234
        pbsc    *+$1234
        pbas    *+$1234
        pbac    *+$1234
        pbws    *+$1234
        pbwc    *+$1234
        pbis    *+$1234
        pbic    *+$1234
        pbgs    *+$1234
        pbgc    *+$1234
        pbcs    *+$1234
        pbcc    *+$1234
        pbbs    *+$12345678
        pbbc    *+$12345678
        pbls    *+$12345678
        pblc    *+$12345678
        pbss    *+$12345678
        pbsc    *+$12345678
        pbas    *+$12345678
        pbac    *+$12345678
        pbws    *+$12345678
        pbwc    *+$12345678
        pbis    *+$12345678
        pbic    *+$12345678
        pbgs    *+$12345678
        pbgc    *+$12345678
        pbcs    *+$12345678
        pbcc    *+$12345678
        pdbbs   d2,*+$1234
        pdbbc   d2,*+$1234
        pdbls   d2,*+$1234
        pdblc   d2,*+$1234
        pdbss   d2,*+$1234
        pdbsc   d2,*+$1234
        pdbas   d2,*+$1234
        pdbac   d2,*+$1234
        pdbws   d2,*+$1234
        pdbwc   d2,*+$1234
        pdbis   d2,*+$1234
        pdbic   d2,*+$1234
        pdbgs   d2,*+$1234
        pdbgc   d2,*+$1234
        pdbcs   d2,*+$1234
        pdbcc   d2,*+$1234
        ptrapbs
        ptrapbc
        ptrapls
        ptraplc
        ptrapss
        ptrapsc
        ptrapas
        ptrapac
        ptrapws
        ptrapwc
        ptrapis
        ptrapic
        ptrapgs
        ptrapgc
        ptrapcs
        ptrapcc
        ptrapbs.w #$1234
        ptrapbc.w #$1234
        ptrapls.w #$1234
        ptraplc.w #$1234
        ptrapss.w #$1234
        ptrapsc.w #$1234
        ptrapas.w #$1234
        ptrapac.w #$1234
        ptrapws.w #$1234
        ptrapwc.w #$1234
        ptrapis.w #$1234
        ptrapic.w #$1234
        ptrapgs.w #$1234
        ptrapgc.w #$1234
        ptrapcs.w #$1234
        ptrapcc.w #$1234
        ptrapbs.l #$12345678
        ptrapbc.l #$12345678
        ptrapls.l #$12345678
        ptraplc.l #$12345678
        ptrapss.l #$12345678
        ptrapsc.l #$12345678
        ptrapas.l #$12345678
        ptrapac.l #$12345678
        ptrapws.l #$12345678
        ptrapwc.l #$12345678
        ptrapis.l #$12345678
        ptrapic.l #$12345678
        ptrapgs.l #$12345678
        ptrapgc.l #$12345678
        ptrapcs.l #$12345678
        ptrapcc.l #$12345678
        psbs    d2
        psbs    (a2)
        psbs    (a2)+
        psbs    -(a2)
        psbs    ($1234,a2)
        psbs    ($34,a2,d3.w)
        psbs    ($1234).w
        psbs    ($12345678).l
        psbc    d2
        psbc    (a2)
        psbc    (a2)+
        psbc    -(a2)
        psbc    ($1234,a2)
        psbc    ($34,a2,d3.w)
        psbc    ($1234).w
        psbc    ($12345678).l
        psls    d2
        psls    (a2)
        psls    (a2)+
        psls    -(a2)
        psls    ($1234,a2)
        psls    ($34,a2,d3.w)
        psls    ($1234).w
        psls    ($12345678).l
        pslc    d2
        pslc    (a2)
        pslc    (a2)+
        pslc    -(a2)
        pslc    ($1234,a2)
        pslc    ($34,a2,d3.w)
        pslc    ($1234).w
        pslc    ($12345678).l
        psss    d2
        psss    (a2)
        psss    (a2)+
        psss    -(a2)
        psss    ($1234,a2)
        psss    ($34,a2,d3.w)
        psss    ($1234).w
        psss    ($12345678).l
        pssc    d2
        pssc    (a2)
        pssc    (a2)+
        pssc    -(a2)
        pssc    ($1234,a2)
        pssc    ($34,a2,d3.w)
        pssc    ($1234).w
        pssc    ($12345678).l
        psas    d2
        psas    (a2)
        psas    (a2)+
        psas    -(a2)
        psas    ($1234,a2)
        psas    ($34,a2,d3.w)
        psas    ($1234).w
        psas    ($12345678).l
        psac    d2
        psac    (a2)
        psac    (a2)+
        psac    -(a2)
        psac    ($1234,a2)
        psac    ($34,a2,d3.w)
        psac    ($1234).w
        psac    ($12345678).l
        psws    d2
        psws    (a2)
        psws    (a2)+
        psws    -(a2)
        psws    ($1234,a2)
        psws    ($34,a2,d3.w)
        psws    ($1234).w
        psws    ($12345678).l
        pswc    d2
        pswc    (a2)
        pswc    (a2)+
        pswc    -(a2)
        pswc    ($1234,a2)
        pswc    ($34,a2,d3.w)
        pswc    ($1234).w
        pswc    ($12345678).l
        psis    d2
        psis    (a2)
        psis    (a2)+
        psis    -(a2)
        psis    ($1234,a2)
        psis    ($34,a2,d3.w)
        psis    ($1234).w
        psis    ($12345678).l
        psic    d2
        psic    (a2)
        psic    (a2)+
        psic    -(a2)
        psic    ($1234,a2)
        psic    ($34,a2,d3.w)
        psic    ($1234).w
        psic    ($12345678).l
        psgs    d2
        psgs    (a2)
        psgs    (a2)+
        psgs    -(a2)
        psgs    ($1234,a2)
        psgs    ($34,a2,d3.w)
        psgs    ($1234).w
        psgs    ($12345678).l
        psgc    d2
        psgc    (a2)
        psgc    (a2)+
        psgc    -(a2)
        psgc    ($1234,a2)
        psgc    ($34,a2,d3.w)
        psgc    ($1234).w
        psgc    ($12345678).l
        pscs    d2
        pscs    (a2)
        pscs    (a2)+
        pscs    -(a2)
        pscs    ($1234,a2)
        pscs    ($34,a2,d3.w)
        pscs    ($1234).w
        pscs    ($12345678).l
        pscc    d2
        pscc    (a2)
        pscc    (a2)+
        pscc    -(a2)
        pscc    ($1234,a2)
        pscc    ($34,a2,d3.w)
        pscc    ($1234).w
        pscc    ($12345678).l
;;; MC68851 system
        pflusha
        pflush  #15,#4
        pflush  d4,#15
        pflush  sfc,#1
        pflush  dfc,#7
        pflushs #15,#4
        pflushs d4,#15
        pflushs sfc,#1
        pflushs dfc,#7
        pflush  #15,#4,(a2)
        pflush  d4,#15,($1234,a2)
        pflush  sfc,#1,($34,a2,d3.w)
        pflush  dfc,#1,($1234).w
        pflush  #15,#4,($23445678).l
        pflushs #15,#4,(a2)
        pflushs d4,#15,($1234,a2)
        pflushs sfc,#1,($34,a2,d3.w)
        pflushs dfc,#1,($1234).w
        pflushs #15,#4,($23445678).l
        pflushr (a2)
        pflushr (a2)+
        pflushr -(a2)
        pflushr ($1234,a2)
        pflushr ($34,a2,d3.w)
        pflushr ($1234).w
        pflushr ($23445678).l
        pflushr (*+$1234,pc)
        pflushr (*+52,pc,d3.l)
        pflushr #$123456789abcdef0
        ploadr  #15,(a2)
        ploadr  d3,($1234,a2)
        ploadr  sfc,($34,a2,d3.w)
        ploadr  dfc,($1234).w
        ploadr  #10,($23445678).l
        ploadw  #15,(a2)
        ploadw  d3,($1234,a2)
        ploadw  sfc,($34,a2,d3.w)
        ploadw  dfc,($1234).w
        ploadw  #10,($23445678).l
        prestore (a2)
        prestore (a2)+
        prestore ($1234,a2)
        prestore ($34,a2,d3.w)
        prestore ($1234).w
        prestore ($23445678).l
        prestore (*+$1234,pc)
        prestore (*+52,pc,d3.l)
        psave   (a2)
        psave   -(a2)
        psave   ($1234,a2)
        psave   ($34,a2,d3.w)
        psave   ($1234).w
        psave   ($23445678).l
        ptestr  #7,(a2),#4
        ptestr  d3,($1234,a2),#7
        ptestr  sfc,($34,a2,d3.w),#1
        ptestr  dfc,($1234).w,#5
        ptestr  #15,($12345678).l,#2
        ptestr  #7,(a2),#4
        ptestr  d3,($1234,a2),#7
        ptestr  sfc,($34,a2,d3.w),#1
        ptestr  dfc,($1234).w,#5
        ptestr  #15,($12345678).l,#2
        ptestr  #7,(a2),#4,a3
        ptestr  d3,($1234,a2),#7,a4
        ptestr  sfc,($34,a2,d3.w),#1,a3
        ptestr  dfc,($1234).w,#5,a3
        ptestr  #15,($12345678).l,#2,a3
        ptestw  #7,(a2),#4
        ptestw  d3,($1234,a2),#7
        ptestw  sfc,($34,a2,d3.w),#1
        ptestw  dfc,($1234).w,#5
        ptestw  #15,($12345678).l,#2
        ptestw  #7,(a2),#4
        ptestw  d3,($1234,a2),#7
        ptestw  sfc,($34,a2,d3.w),#1
        ptestw  dfc,($1234).w,#5
        ptestw  #15,($12345678).l,#2
        ptestw  #7,(a2),#4,a3
        ptestw  d3,($1234,a2),#7,a4
        ptestw  sfc,($34,a2,d3.w),#1,a3
        ptestw  dfc,($1234).w,#5,a3
        ptestw  #15,($12345678).l,#2,a3
        pvalid  val,(a2)
        pvalid  val,($1234,a2)
        pvalid  val,($34,a2,d3.w)
        pvalid  val,($1234).w
        pvalid  val,($12345678).l
        pvalid  a3,(a2)
        pvalid  a4,($1234,a2)
        pvalid  a5,($34,a2,d3.w)
        pvalid  a6,($1234).w
        pvalid  a7,($12345678).l

;### Local Variables:
;### mode: asm
;### End:
;### vim: set ft=asm:
