scene.org File Archive

File download

<root>­/­parties­/­2025­/­lovebyte25­/­32_byte_intro_oldschool/cordic-demo-32.zip

File size:
13 083 bytes (12.78K)
File date:
2025-02-20 09:05:02
Download count:
all-time: 1

Preview

  • Cordic32.asm 900B
  • CordicDemo32.png 13.70K
  • CordicDemo32.tap 7.60K
  • Readme.txt 865B

file_id.diz

::::::::::::::::::::
:: CORDIC demo 32 ::
::::::::::::::::::::

32 byte education intro for ZX Spectrum 48k

  Code: Busy soft
  Create: 27.01.2025
  Release: LoveByte 2025

This intro uses simplified CORDIC algorithm
to create monochrom shapes with circle quarters.

  FOR y = 159 TO 1
   FOR x = 159 TO 1
    Size = SQR(x^2+y^2)
    IF s MOD m < m/2 THEN PLOT x,y

Value of 'm' iterates from 8 to 256 by control basic.

Computation of

  Size = SQR(x^2+y^2)

is based on this 14 byte routine from CORDIC demo 16


  Input: C = coordinate X
         B = coordinate Y

        ld      a,c
        cp      b
        jr      nc,L1
        ld      c,b
        ld      b,a

        ld      a,c
    L1: sub     b
        jr      nc,L2
        inc     c
        add     c
    L2: djnz    L1

 Output: C = result = SQR(X^2+Y^2)