?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. #ifndef included_xconst
  2. #define included_xconst
  3. #include "constantsx.z80"
  4.  
  5. xconsti:
  6.     ex (sp),hl
  7.     ld a,(hl)
  8.     inc hl
  9.     ex (sp),hl
  10. xconst:
  11. ;A is the constant ID#
  12. ;returns nc if failed, c otherwise
  13. ;HL points to the constant
  14.   cp (end_xconst-start_xconst)/10
  15.   ret nc
  16.   ;multiply A by 10
  17.   ld l,a
  18.   add a,a
  19.   add a,a
  20.   add a,l
  21.   add a,a
  22.   add a,start_xconst&255
  23.   ld l,a
  24.   ld h,start_xconst>>8
  25.   ret nc
  26.   inc h
  27.   ret
  28. #endif
  29.