$regfile = "m16def.dat"
$crystal = 8000000
Dim A As Byte
Dim B As Byte
Dim X As Byte
Dim C As Byte
Config Portb = Output
Config Portc = Output
Config Porta = Input
Config Portd = Input
A = 0
B = 0
q:
Do
X = Porta
If Portd.0 = 1 Then Exit Do
Loop
Do
C = X Mod 2
If C = 0 Then Incr A
If C = 1 Then Incr B
If X < 2 Then Exit Do
X = X / 2
Loop
Portb = B
Portc = A
goto q
End
تو برنامه بالا C = X Mod 2یعنی چیه؟