hello
I can not seem to translate a program in mikroPascal asm program
the operation I want is the video, the program mikroPascal
it works very well in simulation.
question, how to have the same program in asm?
quelqun here can convert this program in mikroPascal asm?
thank you
video simulation program Mikropascal
https://www.youtube.com/watch?v=rnyvM3mGeUw
program mikropascal
I can not seem to translate a program in mikroPascal asm program
the operation I want is the video, the program mikroPascal
it works very well in simulation.
question, how to have the same program in asm?
quelqun here can convert this program in mikroPascal asm?
thank you
video simulation program Mikropascal
https://www.youtube.com/watch?v=rnyvM3mGeUw
program mikropascal
program LEDINT;
var jeton, interuption: byte ;
i: integer;
procedure interrupt;
begin
interuption :=1;
portb.6:=0; /// SI INTERRUPTION RESET LED 1
portb.7:=0; /// SI INTERRUPTION RESET LED 2
portb.5:=1; /// SI INTERRUPTION LED DEFAUT
delay_ms(2000); ///
portb.5:=0; /// ON RESET LA LED DEFAUT
INTCON:=$90;
end;
Procedure attente;
begin
for i:=0 to 4000 do
begin
delay_ms(1);
if interuption = 1 then break;
end;
interuption :=0;
end;
begin
jeton:=0;
interuption:=0;
trisa.0:=1; ///SW1 EN ENTREE
trisa.1:=1; /// SW2 EN ENTREE
trisb.0:=1; /// INT EN ENTREE
trisb.6:=0; /// LED1 EN SORTIE
portb.6:=0; /// RESET LED1
trisb.7:=0; /// LED2 EN SORTIE
portb.7:=0; /// RESET LED2
trisb.5:=0; /// PORTB.5 EN SORTIE
portb.5:=0; /// LED DEFAUT RESET
INTCON:=$90;
while true do
begin
if ((porta.0 = 1) and ((jeton = 0) OR (jeton = 2))) then
begin
portb.6:=1;
jeton:=1;
attente;
portb.6:=0;
end;
if ((porta.1 = 1) and ((jeton = 0) OR (jeton = 1)))then
begin
portb.7:=1;
jeton:=2;
attente;
portb.7:=0;
end;
end;
end.