?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. #ifndef included_C_times_BDE
  2. #define included_C_times_BDE
  3.  
  4. C_times_BDE:
  5. ;C*BDE => CAHL
  6. ;C>=128    155+6*(20+{0,21+{0,1}}) + {0,20+{0,8}}
  7. ;C>=64     155+5*(20+{0,21+{0,1}}) + {0,20+{0,8}}
  8. ;C>=32     155+4*(20+{0,21+{0,1}}) + {0,20+{0,8}}
  9. ;C>=16     155+3*(20+{0,21+{0,1}}) + {0,20+{0,8}}
  10. ;C>=8      155+2*(20+{0,21+{0,1}}) + {0,20+{0,8}}
  11. ;C>=4      155+1*(20+{0,21+{0,1}}) + {0,20+{0,8}}
  12. ;C>=2      155+0*(20+{0,21+{0,1}}) + {0,20+{0,8}}
  13. ;C==1      136
  14. ;C==0      152
  15. ;max: 435cc
  16. ;min: 136cc
  17. ;avg: ~320.87cc (320+223/256)
  18. ;114 bytes
  19. ;
  20.   ld a,b
  21.   ld h,d
  22.   ld l,e
  23.   sla c \ jr c,mul8_24_1
  24.   sla c \ jr c,mul8_24_2
  25.   sla c \ jr c,mul8_24_3
  26.   sla c \ jr c,mul8_24_4
  27.   sla c \ jr c,mul8_24_5
  28.   sla c \ jr c,mul8_24_6
  29.   sla c \ jr c,mul8_24_7
  30.   sla c \ ret c
  31.   ld a,c
  32.   ld h,c
  33.   ld l,c
  34.   ret
  35. mul8_24_1:
  36.     add hl,hl \ rla \ rl c \ jr nc,$+7 \ add hl,de \ adc a,b \ jr nc,$+3 \ inc c
  37. mul8_24_2:
  38.     add hl,hl \ rla \ rl c \ jr nc,$+7 \ add hl,de \ adc a,b \ jr nc,$+3 \ inc c
  39. mul8_24_3:
  40.     add hl,hl \ rla \ rl c \ jr nc,$+7 \ add hl,de \ adc a,b \ jr nc,$+3 \ inc c
  41. mul8_24_4:
  42.     add hl,hl \ rla \ rl c \ jr nc,$+7 \ add hl,de \ adc a,b \ jr nc,$+3 \ inc c
  43. mul8_24_5:
  44.     add hl,hl \ rla \ rl c \ jr nc,$+7 \ add hl,de \ adc a,b \ jr nc,$+3 \ inc c
  45. mul8_24_6:
  46.     add hl,hl \ rla \ rl c \ jr nc,$+7 \ add hl,de \ adc a,b \ jr nc,$+3 \ inc c
  47. mul8_24_7:
  48.     add hl,hl \ rla \ rl c \ ret nc \ add hl,de \ adc a,b \ ret nc \ inc c \ ret
  49. #endif
  50.