DataMuseum.dk

Presents historical artifacts from the history of:

Jet Computer Jet80

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Jet Computer Jet80

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦cb1b7a56c⟧ TextFile

    Length: 1024 (0x400)
    Types: TextFile
    Names: »MFILL.MAC«

Derivation

└─⟦01b5c9619⟧ Bits:30005906 Microsoft Multiplan v1.05 og HELP
    └─ ⟦this⟧ »MFILL.MAC« 

TextFile

;
;
;
;	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»