usr.asm 389 B

1234567891011121314151617
  1. ; Emulates the USR Sinclair BASIC function
  2. ; Result value returns in BC
  3. ; We use HL for returning values, su we must
  4. ; copy BC into HL before returning
  5. ; The incoming parameter is HL (Address to JUMP)
  6. ;
  7. #include once <table_jump.asm>
  8. ;
  9. USR:
  10. jsr CALL_HL ;- call CALL_HL
  11. lda z80_b ;- ld h,b
  12. sta z80_h
  13. lda z80_c ;- ld l,c
  14. sta z80_l
  15. rts ;- ret