Metropoli BBS
VIEWER: lst5-1.asm MODE: TEXT (ASCII)
;
; *** Listing 5-1 ***
;
; Copies a byte via AH endlessly, for the purpose of
; illustrating the complexity of a complete understanding
; of even the simplest instruction sequence on the PC.
;
; Note: This program is an endless loop, and never exits!
;
; Compile and link as a standalone program; not intended
; for use with the Zen timer.
;
mystack	segment	para stack 'STACK'
	db	512 dup(?)
mystack	ends
;
Code	segment word public 'CODE'
	assume	cs:Code, ds:Code
Start	proc	near
	push	cs
	pop	ds
	jmp	Skip
;
i	db	1
j	db	0
;
Skip:
	rept	1000
	mov	ah,ds:[i]
	mov	ds:[j],ah
	endm
	jmp	Skip
Start	endp
Code	ends
	end	Start

[ RETURN TO DIRECTORY ]