stdio_staterestore.asm
bitfixer_bitfixer/dg/z88dk/libsrc/stdio_new/general/stdio_staterestore.asm
; stdio_staterestore
; 08.2009 aralbrec

PUBLIC stdio_staterestore

; pops all registers from stack
; companion to stdio_statesave

.stdio_staterestore

   pop hl                      ; hl = return address

   exx
   ex af,af
   
   pop iy
   pop ix
   
   pop hl
   pop de
   pop bc
   pop af
   
   exx
   ex af,af
   
   pop de
   pop bc
   pop af
   ex (sp),hl
   
   ret
