A code dont know in what language .?

Discussion in 'Programmer's Corner' started by electrontube, Sep 21, 2010.

  1. electrontube

    Thread Starter New Member

    Sep 19, 2010
    3
    0
    I was looking for schematic to build a circuit , and found a code , never beeen good with programing , do not know if its avr or c++ , if i can get it to work i can compile it and get the hex file ., hope one can help

    by the way its not in english , but i guess it dont matter.,

    Listing Software
    ;===========================================
    ; PROGRAM INVERTER OLEH: DIDIK ROSTYONO 2006
    ;===========================================
    ;P1=INPUT P3=OUTPUT
    ;P1.2=TOMBOL START P1.3=BATERE CEK
    ;P3.0=DRIVER1 P3.1=DRIVER2
    ;P3.4=BUZZER P3.5=LED
    ;INISIALISASI (BEEP PENDEK + BEEP PANJANG)
    ORG 00H
    ON: MOV P3,#20H; DRIVER OFF, BUZZER OFF, LED OFF
    ACALL DELAI; TUNGGU 1/4 DETIK
    SETB P3.4; BEEP ON
    CLR P3.5; LED BIRU ON
    ACALL DELAI; TUNGGU 1/4 DETIK
    CLR P3.4; BEEP OFF
    SETB P3.5; LED BIRU OFF
    ACALL DELAI; TUNGGU 1/4 DETIK
    SETB P3.4; BEEP ON
    CLR P3.5; LED BIRU ON
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    CLR P3.4; BEEP OFF
    SETB P3.5; LED BIRU OFF
    ;CEK KONDISI BATERE (LOW VOLTAGE = 2 X BEEP PENDEK)
    CEK: JNB P1.3,MULAI; CEK KONDISI BATERE
    CLR P3.5; LED BIRU ON
    SETB P3.4; BEEP ON
    ACALL DELAI; TUNGGU 1/4 DETIK
    SETB P3.5; LED BIRU OFF
    CLR P3.4; BEEP OFF
    ACALL DELAI; TUNGGU 1/4 DETIK
    CLR P3.5; LED BIRU ON
    SETB P3.4; BEEP ON
    ACALL DELAI; TUNGGU 1/4 DETIK
    SETB P3.5; LED BIRU OFF
    CLR P3.4; BEEP OFF
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    SJMP CEK
    ;INVERTER MENUNGGU PENEKANAN TOMBOL ON
    MULAI: SETB P3.5; LED BIRU OFF
    CLR P3.4; BEEP OFF
    MULAI1: JNB P1.2,START; BACA TOMBOL START
    CLR P3.5; LED BIRU ON
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    JNB P1.2,START; BACA TOMBOL START
    SETB P3.5; LED BIRU OFF
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    AJMP CEK
    ;INVERTER ON
    START: SETB P3.5; LED BIRU OFF
    CLR P3.4; BEEP OFF
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    ACALL DELAI; TUNGGU 1/4 DETIK
    SETB P3.4; BEEP ON
    CLR P3.5; LED BIRU ON
    ACALL DELAI; TUNGGU 1/4 DETIK
    CLR P3.4; BEEP OFF
    ACALL DELAI; TUNGGU 1/4 DETIK
    ;PWM GENERATOR
    PULSE: JNB P1.2,ON; JIKA STOP DITEKAN KEMBALI KE AWAL
    JB P1.3,ON; CEK KONDISI BATERE
    PWM: CLR P3.0;
    CLR P3.1;
    SETB P3.0;
    ACALL PULSE_TRAIN;
    CLR P3.0;
    CLR P3.1;
    ACALL PULSE_TRAIN;
    CLR P3.0;
    CLR P3.1;
    AJMP PULSE
    ;RUTIN DELAI1
    DELAI: MOV R1,#2
    L1: MOV R2,#250
    L2: MOV R3,#250
    L3: DJNZ R3,L3
    DJNZ R2,L2
    DJNZ R1,L1
     
  2. AlexR

    Well-Known Member

    Jan 16, 2008
    735
    54
    C++ it ain't!
    It looks like some flavour of assembler, I would guess one of the 8051 family of chips but I'm afraid the listing not going to be of much use to you unless you know exactly chip the software is written for. Unlike C or C++ assembler is very much hardware specific.
     
  3. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
  4. electrontube

    Thread Starter New Member

    Sep 19, 2010
    3
    0
    ok great thank you all., ill see what info is there ,the link you provided .
     
  5. arachne007

    New Member

    Sep 23, 2010
    7
    3
    I think it's 8051 codes. Comment is in Indonesian language. I can translate if u need it
     
Loading...