|
DataMuseum.dkPresents historical artifacts from the history of: Jet Computer Jet80 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Jet Computer Jet80 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 1536 (0x600) Types: TextFile Names: »MPLSL.MAC«
└─⟦01b5c9619⟧ Bits:30005906 Microsoft Multiplan v1.05 og HELP └─ ⟦this⟧ »MPLSL.MAC«
; ; ; Title Multiple-Precision Logical Shift Left ; Name: MPLSL ; ; ; Purpose: Logical shift left a multi-byte operand ; N bits ; ; Entry: Register pair HL = Base address of operand ; Register B = lenght of operand ; Register C = Number of bits to shift ; ; The operand is stored with ARRAYÆ0Å as its ; least significant byte and ARRAYÆLENGHT-1Å ; its most significant byte, where ARRAY ; is its base address. ; ; Exit: Operand shifted left filling the least ; significant bits with zeros ; CARRY := Last bit shifted from ; most significant position ; ; Registers used: AF,BC,DE ; ; Time: 31 cycles overhead plus ; ((34 * lenght) + 27) cycles per shift ; ; Size: Program 21 bytes ; ; ; MPLSL: ;Exit if number of shifts or lenght of operand is 0 ;or clears carry in eighter case ld a,c or a ret z ;Return if number of shifts is 0 ld a,b or a ret z ;Return if lenght of operand is 0 ;Loop on number of shifts to perform ;A = lenght of operand ;C = number of shifts ;HL = address of least significant (first) byte of operand ;Carry = 0 initialy for logical shift loop: ld e,l ;Save address of LSB ld d,h ld b,a ;B = lenght of operand or a ;Clear carry for logical shift ;Rotate bytes starting with least significant lsllp: rl (hl) ;Rotate next byte left inc hl ;Increment to more significant byte djnz lsllp ld l,e ;Restore address of LSB ld h,d dec c ;Decrement number of shifts jr nz,loop ret «eof»