Blindseer42 Posted September 15, 2019 Share Posted September 15, 2019 The Z80 has more instructions then the 6502, runs at 4Mhz and yet there are no provisions for Division and Multiplication, I have to add them manually and add the code to get them to work? Why is this? Sample code is here Quote Link to comment Share on other sites More sharing options...
ChildOfCv Posted September 15, 2019 Share Posted September 15, 2019 Most early processors had no multiply or divide instruction. However, your multiply and divide routines are completely inefficient. You should look for Z80 multiply and divide routines that use efficient shift and add/subtract methods. Quote Link to comment Share on other sites More sharing options...
Blindseer42 Posted September 15, 2019 Author Share Posted September 15, 2019 1 hour ago, ChildOfCv said: Most early processors had no multiply or divide instruction. However, your multiply and divide routines are completely inefficient. You should look for Z80 multiply and divide routines that use efficient shift and add/subtract methods. I'm using the site's suggested routines for now. Z80 is easier for me then 6502 Quote Link to comment Share on other sites More sharing options...
ChildOfCv Posted September 15, 2019 Share Posted September 15, 2019 2 hours ago, Blindseer42 said: I'm using the site's suggested routines for now. Z80 is easier for me then 6502 I'm not sure what 6502 has to do with this... I suggested looking for Z80 functions that do multiply and divide efficiently. But if you're just trying to learn Z80 machine code using examples, then rock on. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.