MACRO-80 3.4 26-Nov-80 PAGE 1 .z80 external Word,NBits ;Function ROTLFT rotates ;integer Word by NBits left 0000' 2A 0000* rotlft: ld HL,(Word) 0003' 3A 0000* ld A,(NBits) 0006' E6 0F and 0FH 0008' B7 or A 0009' C8 ret Z ;No rotation ;if NBits 0 000A' 47 ld B,A 000B' 7D ld A,L 000C' 2E 00 ld L,0 000E' CB 27 loop: sla A ;MSB in carry 0010' CB 14 rl H 0012' 8D adc A,L ;Carry restore 0013' 10 F9 djnz loop 0015' 6F ld L,A ;Result in HL 0016' C9 ret end rotlft MACRO-80 3.4 26-Nov-80 PAGE S Macros: Symbols: LOOP 000E' NBITS 0004* ROTLFT 0000' WORD 0001* No Fatal error(s)