|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 1024 (0x400) Types: TextFile Names: »MFILL.MAC«
└─⟦01b5c9619⟧ Bits:30005906 Microsoft Multiplan v1.05 og HELP └─ ⟦this⟧ »MFILL.MAC«
; ; ; ; Title Memory fill ; Name: MFILL ; ; ; Purpose: Fill an area of memory with a value ; ; Entry: Register H = High byte of base address ; Register L = Low byte of base address ; Register B = High byte of area size ; Register C = Low byte of area size ; Register A = Value to be placed in memory ; ; Note: A size of 0 is interpreted as 65536 ; ; Exit: Area filled with value ; ; Registers used: AF,BC,DE,HL ; ; Time: Approximately 21 cycles per byte plus ; 50 cycles overhead ; ; Size: Program 11 bytes ; Data None ; ; ; MFILL: ld (hl),a ;Fill first byte with value ld d,h ;Destination ptr = source ptr + 1 ld e,l inc de dec bc ;Eliminate first byte form count ld a,b ;Are there more bytes to fill ? or c ret z ;No, Return - size was 1 ldir ;Yes, use block move to fille rest ; by moving value ahead 1 byte ret «eof»