abecedarian 330 Posted November 17, 2012 Share Posted November 17, 2012 I don't think anyone has named the "three words" which would name the "application"? Control Program / Monitor? Bad attempt at humor. Never mind. No problem admitting I'm a .... Quote Link to post Share on other sites
simpleavr 399 Posted November 17, 2012 Author Share Posted November 17, 2012 Now how would I implement CP/M. I already got some basic bios functions in it. Mainly to support the 901, 902 opcodes. now I am contemplating whether I have enough time to do some sort of integer basic. Quote Link to post Share on other sites
simpleavr 399 Posted November 17, 2012 Author Share Posted November 17, 2012 Although have not thought of it. But indeed there was a monitor shown. Not that it's CP/M like where u have full file systems, disk access. Mine would be closer to a Kim-1 monitor. Allows for address entries, "mod"ify mode and "run" mode. Quote Link to post Share on other sites
hova 7 Posted November 18, 2012 Share Posted November 18, 2012 This is awesome. I was just looking at the LMC wiki the other night , and wondered what exactly it would be implemented with... You think you could pm or post the source? abecedarian 1 Quote Link to post Share on other sites
abecedarian 330 Posted November 18, 2012 Share Posted November 18, 2012 This is awesome. I was just looking at the LMC wiki the other night , and wondered what exactly it would be implemented with... You think you could pm or post the source? I was hoping for the same. Quote Link to post Share on other sites
simpleavr 399 Posted November 19, 2012 Author Share Posted November 19, 2012 the code is really confusing right now. i kept trying various things w/. it. it has; the LMC interpreter, part of MSP430 assembler/disassembler that i just started recently, a working lunar lander (not physics / math correct) a digit clock + hw key tester a number counter / timer tester. etc. the LMC machine is small, only took one evening. it was actually very simple. only a few instructions and one addressing mode. the harder work was done from earlier projects, a little bios to do basic io (hex and decimal) and basic timing. the "bios" now can take one key, take a numeric value, output char, hex / dec values, string and has a timer. there is also a mini monitor to fetch / store 256byte segments (f000, f100, f200,...) to / from ram at 0x280 for editing. the LMC code after edit goes back to the flash so u can run them again at next power-up session. i would probably clean-up the code so it just do LMC for now and have it on github within this week. so whoever is interested can play w/ it. the real hard part is the msp430 assembler / disassembler i am working on. the instructions are about 30 opcodes which is reasonable to work w/. but there are many addressing modes. there are funny addressing scheme for performance, which is tricky to implement. ex. mov #7, r4 and mov #8, r4 are very different and one is 4 bytes when the other is 2 byte instruction. and the real obstacle for me right now is to handle the psuedo-opcodes (ex. br xxx = mov xxx,pc) mappings. i guess i did not spend time to properly understanding these details before diving in to do the framework / skeleton. i might have to abandon this and go for something simpler (may be an integer basic). well, thanks for your comments. the LMC is very nice and fun to play w/. Quote Link to post Share on other sites
abecedarian 330 Posted November 19, 2012 Share Posted November 19, 2012 Lunar Lander? I hated that game. The physics seemed off. I guess I never made the connection moon=1/6 earth gravity. ;-) Quote Link to post Share on other sites
hova 7 Posted November 19, 2012 Share Posted November 19, 2012 lunar lander?! looks like more googling tomorrow night. Still working on the damn blinky blink. Good on ya for packing so much into that tiny LMC -hov Quote Link to post Share on other sites
simpleavr 399 Posted November 22, 2012 Author Share Posted November 22, 2012 i am attaching this lmc.c file mainly for the benefit of oPossum and whoever is interested in studying this ui boost layout. so consider it kind of a preview. before i finish the rest of the project and do proper write-up. lmc.c this one file features . lmc machine, w/ 2 examples. . led multiplexing . button handling. i had cleanup the code. tested built under cygwin mspgcc and is less than 4k deployed. abecedarian 1 Quote Link to post Share on other sites
abecedarian 330 Posted November 30, 2012 Share Posted November 30, 2012 Darn you Linux-ish users... (and the forum coders who won't let me use "Enter" whilst typing) :grin: CCS reports errors with the code: "#19 extra text after expected end of number" Source: main.c /Paradiso line 269 C/C++ Problem Line 269-279= static const digit2ports[][3] = { SEGS_PORT(LTR_0), SEGS_PORT(LTR_1), SEGS_PORT(LTR_2), SEGS_PORT(LTR_3), SEGS_PORT(LTR_4), SEGS_PORT(LTR_5), SEGS_PORT(LTR_6), SEGS_PORT(LTR_7), SEGS_PORT(LTR_8), SEGS_PORT(LTR_9), SEGS_PORT(LTR_A), SEGS_PORT(LTR_, SEGS_PORT(LTR_C), SEGS_PORT(LTR_d), SEGS_PORT(LTR_E), SEGS_PORT(LTR_F), SEGS_PORT(LTR_g), SEGS_PORT(LTR_h), SEGS_PORT(LTR_I), SEGS_PORT(LTR_J), SEGS_PORT(LTR_k), SEGS_PORT(LTR_L), SEGS_PORT(LTR_m), SEGS_PORT(LTR_n), SEGS_PORT(LTR_o), SEGS_PORT(LTR_P), SEGS_PORT(LTR_q), SEGS_PORT(LTR_r), SEGS_PORT(LTR_S), SEGS_PORT(LTR_t), SEGS_PORT(LTR_u), SEGS_PORT(LTR_v), SEGS_PORT(LTR_w), SEGS_PORT(LTR_X), SEGS_PORT(LTR_y), SEGS_PORT(LTR_Z), SEGS_PORT(BLANK), SEGS_PORT(LTRmn) }; Quote Link to post Share on other sites
oPossum 1,083 Posted November 30, 2012 Share Posted November 30, 2012 CCS does not support the non-standard 0bNNNNNNNN format, you will have to change them to 0xNN The interrupt declarations will also have to be changed, maybe some other stuff too. Quote Link to post Share on other sites
simpleavr 399 Posted November 30, 2012 Author Share Posted November 30, 2012 i.e. example change #define LTR_9 0b01111011 #define BLANK 0b00000000 to #define LTR_9 0x7b // 0111 1011 #define BLANK 0x00 // 0000 0000 and do it many times. yeah, there will be more errors. i will try CCS when i have time (and access to a window box). Quote Link to post Share on other sites
Rickta59 589 Posted November 30, 2012 Share Posted November 30, 2012 I see it has been a while since you have been here simpleavr. You might want to try out CCS V5.3 on linux. It won't allow you to upload to a launchpad but you can use it to compile code under CCS in linux. http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/CCSv5/CCS_5_3_0/exports/ReleaseNoteRC1.htm simpleavr 1 Quote Link to post Share on other sites
cde 334 Posted November 30, 2012 Share Posted November 30, 2012 0bxxxxxxx is none standard? I need to test on iar. Quote Link to post Share on other sites
abecedarian 330 Posted November 30, 2012 Share Posted November 30, 2012 What have I started? ;-) (finished?) Quote Link to post Share on other sites
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.