Software & Apps

Software und Apps sind aus unserem Alltag nicht mehr wegzudenken; von Musik- und Videobearbeitung, Antiviren-Tools, VPN-Clients bis hin zu Office und gewissen Alternativen - hier dreht sich alles um Software & Apps für Deinen PC.
67.816 Beiträge

Ask Me Anything: Blickwechsel

Du stellst die Fragen, ein außergewöhnlicher Nutzer antwortet! Begegne mit Deinen Fragen anderen Menschen hautnah und persönlich.

Ask Me Anything: Themenspecials

Im gutefrage Themenspecial beantworten Verbände, Organisationen und Personen des öffentlichen Lebens Deine Fragen zu aktuellen Themen.
C Kompilieren für einen w65c02 Mikroprozessor?

Guten Tag,

Ich probiere schon eine weile mit einem w65c02 Mikroprozessor inklusive EEPROM, RAM und IO-Interface herum. Bisher habe ich diesen immer mit VASM Assembly Code Programmiert und es hat auch alles geklappt. Allerdings möchte ich nun für Komplexere Programme diesen mit C Programmieren.

Nach einiger Recherche habe ich mir die vbcc Compiler heruntergeladen. Nun habe ich das Problem das dieser das Programm nicht Kompilieren will.

Kompilieren tu ich indem der folgende Befehl ausgeführt wird:

vc -65c02 +src\\W65C02.cfg -o bin\\a.out src\\main.c

Dieser wird auch soweit erfolgreich ausgeführt, allerdings wird am angegebenen Pfad keine Datei erstellt und es kommt auch keine Meldung das irgendetwas fehlgeschlagen ist.

Der Inhalt vom src\main.c ist nur ein leeres Programm:

void main(void) {
}

Der Inhalt von src\W65C02.cfg ist das Linker-Skript das genutzt wird (Wenn ich dieses option im Befehl weg lasse schlägt der Befehl mit der Ausgabe No config file! fehl). Hier habe ich zwei Inhalte ausprobiert. Den ersten habe ich mit Hilfe der vlink Dokumentation und etwas Recherche erstellt:

MEMORY {
    EEPROM : ORIGIN = 0x8000, LENGTH = 0x7FF9
    RAM : ORIGIN = 0x4000, LENGTH = 0x1FFF
}

SECTIONS {
    .text : {
        *(.text)
    } > EEPROM


    .data : {
        *(.data)
    } > RAM
}

Den zweiten habe ich in meiner Suche nach einer Lösung vom ChatGPT-4o erstellen lassen mit der Frage:

Schreibe ein Linker Skript für vlink das die Speicher Sektionen des 65c02 konfiguriert. Die Speicherbereiche sind folgende:
RAM: 4000 - 5FFF
EEPROM: 8000 - FFF9

Das Ergebnis war (zusammengefasst):

MEMORY {
    RAM   : ORIGIN = 0x4000, LENGTH = 0x2000  /* 4000 - 5FFF, Größe: 8 KB */
    EEPROM: ORIGIN = 0x8000, LENGTH = 0x7FFA  /* 8000 - FFF9, Größe: ca. 32 KB */
}

SEGMENTS {
    CODE:   load = EEPROM, type = ro
    RODATA: load = EEPROM, type = ro
    DATA:   load = RAM,    type = rw
    BSS:    load = RAM,    type = bss
}

Egal ob ich das erstes Linker-Skript oder das zweite genutzt habe es ist immer so abgelaufen wie oben beschrieben.

Als ich auf Fehlersuche war habe ich bei vc auch die Option -vv (very verbose) aktiviert und dann kam beim ersten Linker Skript folgende Ausgabe:

vc frontend for vbcc (c) in 1995-2020 by Volker Barthelmann
flags=1414 opt=1 len=1490
Argument 6:src\main.c
File "src\main.c"=2
add_name: "C:\Users\<user>\AppData\Local\Temp\vbcc068c.asm"


add_name: "C:\Users\<user>\AppData\Local\Temp\vbcc068c.o"
add_name: "C:\Users\<user>\AppData\Local\Temp\vbcc068c.o"


Argument 7:MEMORY {
File "MEMORY {"=5
add_name: "MEMORY {"
Argument 8:    EEPROM : ORIGIN = 0x8000, LENGTH = 0x7FF9
File "    EEPROM : ORIGIN = 0x8000, LENGTH = 0x7FF9"=5
add_name: "    EEPROM : ORIGIN = 0x8000, LENGTH = 0x7FF9"
Argument 9:    RAM : ORIGIN = 0x4000, LENGTH = 0x1FFF
File "    RAM : ORIGIN = 0x4000, LENGTH = 0x1FFF"=5
add_name: "    RAM : ORIGIN = 0x4000, LENGTH = 0x1FFF"
Argument 10:}
File "}"=5
add_name: "}"
Argument 12:SECTIONS {
File "SECTIONS {"=5
add_name: "SECTIONS {"
Argument 13:    .text : {
File "    .text : {"=5
add_name: "    .text : {"
Argument 14:        *(.text)
File "        *(.text)"=5
add_name: "        *(.text)"
Argument 15:    } > EEPROM
File "    } > EEPROM"=5
add_name: "    } > EEPROM"
Argument 17:    .data : {
File "    .data : {"=5
add_name: "    .data : {"
Argument 18:        *(.data)
File "        *(.data)"=5
add_name: "        *(.data)"
Argument 19:    }
File "    }"=5
add_name: "    }"
Argument 20:}
File "}"=5
add_name: "}"
linklen=296

free p->obj
"C:\Users\<user>\AppData\Local\Temp\vbcc068c.o"
free p
free p->obj
"MEMORY {"
free p
free p->obj
"    EEPROM : ORIGIN = 0x8000, LENGTH = 0x7FF9"
free p
free p->obj
"    RAM : ORIGIN = 0x4000, LENGTH = 0x1FFF"
free p
free p->obj
"}"
free p
free p->obj
"SECTIONS {"
free p
free p->obj
"    .text : {"
free p
free p->obj
"        *(.text)"
free p
free p->obj
"    } > EEPROM"
free p
free p->obj
"    .data : {"
free p
free p->obj
"        *(.data)"
free p
free p->obj
"    }"
free p
free p->obj
"}"
free p
free p->obj
"C:\Users\<user>\AppData\Local\Temp\vbcc068c.asm"
free p
free p->obj
"C:\Users\<user>\AppData\Local\Temp\vbcc068c.o"
free p

Beim ausführen vom zweiten Linker Skript mit -vv kommt eine ähnliche Ausgabe wo ebenfalls das Linker-Skript teilweise wiederholt wird.

Hoffe jemand weiß was ich falsch mache und kann helfen, lg Suiram1.

DropDown-Menu Links für Handy?

wenn ich mein dropdown-menu habe, und ich will dass wenn sich dieses dropdown-menu öffnet und die kategorien zum auswählen bereitstellt, dass wenn ich auf die Kategorie klicke dann sich ein link öffnet, dies funktioniert mit meinem html code (auf der website version) perfekt, jedoch funktioniert dies nicht in der smartphone ansicht, warum das ?

Falls es hilft hier dier html-code

 

<!DOCTYPE html>

<html lang="en">

<head>

  <title>Language Selection</title>

  <style>

    /* Dropdown Button */

    .dropbtn {

      font-size: 16px; 

      border: none;

    }

    /* The container <div> - needed to position the dropdown content */

    .dropdown {

      position: relative;

      display: inline-block;

    }

    /* Dropdown Content */

    .dropdown-content {

      display: none;

      position: absolute;

      background-color: transparent;

      min-width: 100px;

      box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);

      z-index: 1;

      top: 100%;

      left: 50%;

      transform: translateX(-50%);

      margin: 8px 0;

    }

    /* Links inside the dropdown */

    .dropdown-content a {

      color: transparent;

    padding: 15px 13px; 

      text-decoration: none;

       

    }

    /* Change color of dropdown links on hover */

    .dropdown-content a:hover {

      background-color: transparent; /* Ändere die Hintergrundfarbe beim Hover */

    }

    /* Show the dropdown menu when hovering over the dropdown */

    .dropdown:hover .dropdown-content {

      display: block;

    }

    /* Keep the dropdown menu open when hovering over it */

    .dropdown:hover .dropbtn {

      background-color: transparent;

    }

     

  </style>

   

</head>

<body>

  <div class="gtco-loader"></div>

  <div id="page">

    <nav class="gtco-nav" role="navigation">

      <div class="container">

        <div class="row">

          <div class="col-sm-2 col-xs-12">

            <div id="gtco-logo"><a href="index.html">Endo<em>scopy</em></a></div>

          </div>

          <div class="col-xs-10 text-right menu-1 main-nav">

            <ul>

              <li class="active"><a href="#" data-nav-section="home">Home</a></li>

              <li><a href="#" data-nav-section="about">Über uns</a></li>

              <li><a href="#" data-nav-section="practice-areas">Anwendungsbereiche</a></li>

              <li><a href="#" data-nav-section="technics">Operationstechniken</a></li>

              <li><a href="#" data-nav-section="our-team">Unser Team</a></li>

              <li class="btn-cta"><a href="#" data-nav-section="contact"><span>Kontakt</span></a></li>

              <li class="dropdown">

                <div class="dropdown">

                  <a href="#" class="dropbtn">Deutsch ∨</a>

                  <div class="dropdown-content">

                    <p><a href="italiano.html" class="italiano">Italiano</a></p> 

                    <p><a href="english.html" class="english">English</a></p> 

                  </div>

                </div>

              </li>

            </ul>

          </div>

        </div>

      </div>

    </nav>

  </div>

  <script>

  // JavaScript to handle dropdown menu clicks

  document.addEventListener("DOMContentLoaded", function() {

    var dropdownButtons = document.querySelectorAll(".dropdown .dropbtn");

    var dropdownContents = document.querySelectorAll(".dropdown .dropdown-content");

    // Function to toggle the dropdown content visibility

    function toggleDropdown(index) {

      if (dropdownContents[index].classList.contains("show")) {

        dropdownContents[index].classList.remove("show");

      } else {

        dropdownContents[index].classList.add("show");

      }

    }

    // Close dropdown content if clicked outside the dropdown

    window.addEventListener("click", function(event) {

      if (!event.target.matches('.dropbtn')) {

        dropdownContents.forEach(function(content) {

          content.classList.remove("show");

        });

      }

    });

    // Handle dropdown button clicks

    dropdownButtons.forEach(function(button, index) {

      button.addEventListener("click", function(event) {

        event.stopPropagation(); // Prevent the document click event

        toggleDropdown(index);

      });

    });

    // Handle dropdown options clicks

    var dropdownOptions = document.querySelectorAll(".dropdown-content a");

    dropdownOptions.forEach(function(option) {

      option.addEventListener("click", function(event) {

        // Prevent default action

        event.preventDefault();

        // Redirect to the selected page

        window.location.href = option.getAttribute("href");

      });

    });

  });

</script>

</body>

</html>