NewsProductsSprinterSupportDownloadSprinter ForumAbout usLinksSite map Russian site

Reply to (Software programming for the computer Sprinter)
Fill out the form below to post a message on the forum. HTML is disabled. Markup is enabled, so you may use markup in your posts.

Username
Anonymous

Subject

Post Icon

Post

I want to preview my post .

In response to:
Poster: Alex_Goryachev
Subject: Re: The Accelerator

The Accelerator works like external accumulator with N-byte length (N value is setting by "LD D,D" command).
When the Accelerator is switched on, the commands set of Z80 is changed.
And only commands which not uses a data are not changed.

LD L,L - switch the Accelerator to copying a data block mode
LD A,(HL) - load a data to the Accelerator memory
LD B,B - switch the Accelerator off

LD L,L
LD (HL),A - get a data from the Accelerator memory
LD B,B

LD L,L
AND (HL) - AND operation with the Accelerator memory data and data from (HL) - put a result to the Accelerator memory
LD B,B

OR,XOR - like AND operation

Example of program with logic operations:

DI
LD D,D ;switch the Accelerator to define block size mode
LD A,N ;set a block size
; LD B,B ;it was optimised because we need not switch the Accelerator off when the next command is an Accelerator command
LD L,L ;switch the Accelerator to copying a data block mode
LD A,(BC) ;get a data to the Accelerator memory from (BC)
; LD B,B
; LD L,L
AND (HL) ;AND operation with (HL)
; LD B,B
EX DE,HL
; LD L,L
OR (HL) ;OR with (HL)
; LD B,B
EX DE,HL
; LD L,L
LD (BC),A ;put a data to (BC) - a result is N-byte string: (((BC) and (HL)) or (DE))
LD B,B ;switch the Accelerator off
EI




---
PETERS PLUS LTD