Heaven/TQA Posted December 25, 2010 Share Posted December 25, 2010 just a simple question... does the sin command work on the OSX version of MADS? org $5200 sintab dta b(sin(127,127,255,0,0)) this generates only one value $7f followed by "0"s. Any ideas what I am doing wrong here or is it a bug in the OSX compiled version? Quote Link to comment Share on other sites More sharing options...
MaPa Posted December 25, 2010 Share Posted December 25, 2010 (edited) I don't know how MADS but in XASM the sin coomand is sin(center,amp,size,first,last). So I assume it will be the same in MADS, so you wanted only part of it from 0 to 0 so only one value. And you probably should set the size to 256 not 255. If you wanted 256 values of a one sine cycle you should write: sintab dta b(sin(127,127,256,0,255)) Edited December 25, 2010 by MaPa Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted December 25, 2010 Author Share Posted December 25, 2010 hehe... my fault... ok... and how to generate 16bit sin values? so they are divided into a low and a hibyte tabe? org $5400 sintab dta b(sin(127,128,255)) dta b(sin(127,128,255)) sintab2l .byte <(sin(31*256,32*256,255)) sintab2h .byte >(sin(31*256,32*256,255)) does not work... Quote Link to comment Share on other sites More sharing options...
MaPa Posted December 25, 2010 Share Posted December 25, 2010 Try MADS help... but in XASM works: sintab2l dta l(sin(31*256,32*256,255)) sintab2h dta h(sin(31*256,32*256,255)) Quote Link to comment Share on other sites More sharing options...
MaPa Posted December 25, 2010 Share Posted December 25, 2010 (edited) double post... Edited December 25, 2010 by MaPa Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted December 25, 2010 Author Share Posted December 25, 2010 thx 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.