• Please review our updated Terms and Rules here

Assembly code NOT faster than basic one for Double High RES !!

cyril3d

Member
Joined
Jan 3, 2013
Messages
25
Hi

I just tried to code a few lines with the DHR library ARLEQUIN either in its basic and ASM form.
These lines just switch to DHR and write 15 graphics "X" on the screen upon a new color for each one.

Please see the attachement to see the result

the big surprise is that the asm compiled program built with MErlin8 is NOT faster than the basic one !!

If you don't have the Arlequin manual and disk, please ask me

Do you have any idea why the ASM program could be so slow ??

thanks

cyril



the basic code is :
10 & WINDOW(0,19,0,191,1): & BACK(4): & MODE(2)
15 & COL(0): & DISPLAY(2)
20 FOR B = 1 TO 15: & BACK(B): & WRITE("X"): NEXT
30 GET A$: & DISPLAY(0): END

the ASM (with MErlin 8) is:
* programme DHRdhr.JPG
ORG $8000

WINDOW JSR $1FF0
DFB #$24
DW PCOORD
BACK JSR $1FF0
DFB #$0C
DW PBACK
MODE JSR $1FF0
DFB #$3C
DW PMODE
COL JSR $1FF0
DFB #$08
DW PCOL
DISPLAY JSR $1FF0
DFB #$6C
DW PDISP


LDX #$0F
BOUCLE STX PBACKX
BACKX JSR $1FF0
DFB #$0C
DW PBACKX
WRITEX JSR $1FF0
DFB $40
DW WRITELIST

DEX
BNE BOUCLE


RTS

PCOORD DW $00
DW $13
DW $00
DW $BF
DW $01
PBACK DW $04
PMODE DW $02
PCOL DW $00
PDISP DW $02
PBACKX DW $0F
WRITELIST DW ADPATH
ADPATH DB 1
ASC "X"
 
Back
Top