?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1.  ifndef included_pushpop
  2.  define included_pushpop
  3.  ifdef SMC
  4. pushpop:
  5. ;(used to be) 26 bytes, adds 118cc to the traditional routine
  6.   ld (pushpopSaveHL+1),hl
  7.   ex (sp),hl
  8.   ld (pushpopBackJP+1),hl
  9.   push de
  10.   push bc
  11.   push af
  12.   ld hl,pushpopret
  13.   push hl
  14. pushpopSaveHL:
  15.   ld hl,0
  16. pushpopBackJP
  17.   jp 0
  18.  else
  19. pushpop:
  20. ;26 bytes, adds 118cc to the traditional routine
  21.   ex (sp),hl
  22.   push de
  23.   push bc
  24.   push af
  25.   push hl
  26.   ld hl,pushpopret
  27.   ex (sp),hl
  28.   push hl
  29.   push af
  30.   ld hl,12
  31.   add hl,sp
  32.   ld a,(hl)
  33.   inc hl
  34.   ld h,(hl)
  35.   ld l,a
  36.   pop af
  37.   ret
  38.  endif
  39. pushpopret:
  40.   pop af
  41.   pop bc
  42.   pop de
  43.   pop hl
  44.   ret
  45.  endif
  46.