We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
A simple program, compiled on C51 ver. 7.07:
#include <reg51.h> unsigned char mparity(unsigned char arg) { ACC=arg; return P?arg|0x80:arg; } void main () { unsigned char t; t=0x3e; t=mparity(t); }
; FUNCTION _mparity (BEGIN) ; SOURCE LINE # 3 ;---- Variable 'arg' assigned to Register 'R7' ---- ; SOURCE LINE # 5 0000 EF MOV A,R7 ; SOURCE LINE # 6 0001 30D005 JNB P,?C0001 0004 4480 ORL A,#080H 0006 FF MOV R7,A 0007 8000 SJMP ?C0002 0009 ?C0001: 0009 ?C0002: ; SOURCE LINE # 7 0009 ?C0003: 0009 22 RET ; FUNCTION _mparity (END)