home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume5 / smallc / part3 / 6809 / ccstart.u next >
Encoding:
Text File  |  1986-11-30  |  373 b   |  26 lines

  1. |    Run-time start off for ccv1 on the Physics 6809
  2. .globl    _edata
  3. .globl    _main
  4. | Initialize stack
  5.     lds    #/1000
  6.     ldx    #_edata    | clear all of memory
  7. l2:    clr    (x)+
  8.     cmpx    #/0fff
  9.     bne    l2
  10. | Circumvent EPROM bug
  11.     ldx    #/ff3b
  12.     ldb    #6
  13. l1:    pshs    x
  14.     decb
  15.     bne l1
  16. |    clear everything so that start conds are
  17. |    always same
  18.     clra
  19.     clrb
  20.     tfr    a,dp
  21.     tfr    d,x
  22.     tfr    d,y
  23.     tfr    d,u
  24.     jsr    _main
  25.     jmp    /fc00
  26.