HCS12 Calculator

MrChips

Joined Oct 2, 2009
34,829
Also I find that when I press the reset button on my microcontroller, the it only goes back to the START location. It does not reset my RAM and I find I need to actually LDD $0000 and having to store it into all my variables..
Why would you expect RESET to set all variables to zero?
 

Thread Starter

jenxin

Joined Nov 26, 2012
27
Okay so here's my divide method, Works with decimal and all. Now all I need to do is implement signs.
Rich (BB code):
DIV:     JSR BOTLEFT
         LDD DIGIT1
         LDX DIGIT2
         IDIV
         STX RESULT
         STD REM
         JSR OUTPRINT
         LDD REM
         TBNE D, REMAIN
         JMP Get_Input
REMAIN:  LDAA #$2E
         JSR PRINT
D5:      LDD REM
         LDY #10000
         EMUL
         LDX DIGIT2
         EDIV
         STY RESULT
         JSR OUTPRINT
         JMP Get_Input
 

Bogdan90

Joined Dec 11, 2012
1
Hi jenxin ! I have to do a similar project. Can we talk please? My e-mail is <SNIP> please contact me.
 
Last edited by a moderator:
Top