Newsgroups: comp.sys.sinclair
Path: ulke.hiMolde.no!trane.uninett.no!Norway.EU.net!EU.net!CERN.ch!frodet
From: frodet@www.cern.ch (Frode Tenneboe)
Subject: Re: Clean screen (sort of)
X-Nntp-Posting-Host: wwwlab.cern.ch
Message-ID: <DAD4GI.97t@news.cern.ch>
Sender: news@news.cern.ch (USENET News System)
Organization: CERN European Lab for Particle Physics
X-Newsreader: TIN [version 1.2 PL2]
References: <3rvaut$6vt@everyday.everyday.se>
Date: Sun, 18 Jun 1995 09:45:54 GMT
Lines: 59

Roger Lindberg (rogerli@everyday.se) wrote:
: There were two articles in a speccy mag (not the same issue and 
: it could have been two different mags) some time in the 
: mid-80's that I'm interested in.

: The first one was about screen clearing and how to do it in 
: assembler. One method described but never printed used more 
: memory than the 48K the speccy had.( This was pre-128K 
: Spectrums)

Huh? This is easy:

	ld (stack+1),sp
	ld de,0
	ld bc,3456
	ld sp,23295
loop	push de
	dec bc
	ld a,b
	or c
	jr nz,loop
stack	ld sp,0

or even faster (but takes some more mem):

	ld hl,some-adr
	ld bc,3456
loop	ld (hl),213	; opcode for push de
	inc hl
	dec bc
	ld a,b
	or c
	jr nz,loop
	ld (hl),201	;return

And whenever you want to clear the screen:

	ld (stack+1),sp
	ld de,0
	call some-adr
stack	ld sp,0

: The other article was about sorting and they printed a couple 
: of sorting routines, bubble sort, of course, but there were a 
: couple of others too. (Binary sort?)
: These routines were written in BASIC.

: I think the articles were printed in YS, but I'm not sure. Does 
: anyone know which mag it was and what issues?

Sorry :/

: Roger

 -Frode

--
Frode Tenneboe, ECP/PT, CERN, CH-1211 Geneva 23, Switzerland
frodet@www.cern.ch             http://www.himolde.no/~frodet
