It is currently Mon Nov 20, 2017 2:14 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Oct 11, 2017 7:51 pm 
Offline

Joined: Wed Jun 07, 2017 7:55 am
Posts: 8
Keldon's 119 cycle multiply with 16-bit output

Requires:
1. 512 bytes ROM.
2. 4 zero page registers for input and return.

The way it works is really simple (basically long multiplication). It's slower than Damien's 90 cycle fmul, executing 118-119 cycles, which makes it on average faster than eurorusty's method.

The lookup tables are pretty reusable for low level bit manipulation. One table is a nibble flip and the other is a nibble multiplication table, which can also double up as a 16x16 transpose table.

It's written for the online 6502 compiler so you can try it in your browser too.

---

I also found this post with a 38 cycle multiplication with 8-bit in and 16-bit result.

The signed and fixed routines each require:
1. 38 bytes in RAM or 8 bytes in zero page (38 cycles either way).
2. 2kb of ROM.


Last edited by keldon on Thu Oct 12, 2017 6:03 am, edited 3 times in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group