Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. Real hardware

Real hardware

Scheduled Pinned Locked Moved Hardware & Devices
questionhardware
4 Posts 2 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Niklas Ulvinge
    wrote on last edited by
    #1

    This is a real hardware question ;). I'm going to build something of an old C64 computer, I only want to take the processor, and as few components as possible. I'm going to do a hardware that displays time in binary. I'll need the ROM to, or at least another ROM, the program I want to write is like this in assembly:org 100h xor cx,cx xor dx,dx start: inc eax cmp eax,07FFFFFh ;clockspeed in hz je sec jmp start sec: xor eax,eax inc bl push dx push ax mov ch,bl call printANuminCHwithSpace mov ch,cl call printANuminCHwithSpace mov ch,dl call printANuminCH MOV dl, 13 ; print char MOV ah, 02h INT 21h MOV dl, 10 ; print char MOV ah, 02h INT 21h pop ax pop dx cmp bl,60 je min jmp start min: xor bl,bl inc cl cmp cl,60 je h jmp start h: xor cl,cl inc dl cmp dl,24 je day jmp start day: xor dl,dl jmp start printANuminCH: push ax push dx xor ax, ax mov al, ch ;2 char mov dh, 100 ;1 char skipping this for now div dh add al, 30h MOV dl, al ; print char MOV ah, 02h INT 21h xor ax, ax mov al, ch ;2 char mov dh, 100 div dh mov al,ah xor ah,ah mov dh,10 div dh add al, 30h MOV dl, al ; print char MOV ah, 02h INT 21h xor ax, ax mov al, ch ;last char mov dh, 10 div dh add ah, 30h MOV dl, ah ; print char MOV ah, 02h INT 21h pop dx pop ax ret printANuminCHwithSpace: push dx push ax call printANuminCH MOV dl, 20h ; print char MOV ah, 02h INT 21h pop ax pop dx ret
    The displaying code isn't going to be there. Here's how it could look like when implemented: The ports should be replaced and represented by their appropriate value.org 100h xor cx,cx xor dx,dx start: inc ax cmp ax,0FFFFh ;clockspeed in hz je sec jmp start sec: xor ax,ax inc bl out bl,0h cmp bl,60 je min jmp start min: xor bl,bl inc cl out cl,1h cmp cl,60 je h jmp start h: xor cl,cl inc dl out dl,2h cmp dl,24 je day jmp start day: xor dl,dl jmp start
    Is there any good company, (europe should be best, I live in Sweden), that makes ROMs? How much could it cost. I don't want to use to much money. I need 17 outputs, do I need a multiplexer? Where could I get one? How is the machine code in the C64? Thanks in advance Niklas Ulvinge

    D 1 Reply Last reply
    0
    • N Niklas Ulvinge

      This is a real hardware question ;). I'm going to build something of an old C64 computer, I only want to take the processor, and as few components as possible. I'm going to do a hardware that displays time in binary. I'll need the ROM to, or at least another ROM, the program I want to write is like this in assembly:org 100h xor cx,cx xor dx,dx start: inc eax cmp eax,07FFFFFh ;clockspeed in hz je sec jmp start sec: xor eax,eax inc bl push dx push ax mov ch,bl call printANuminCHwithSpace mov ch,cl call printANuminCHwithSpace mov ch,dl call printANuminCH MOV dl, 13 ; print char MOV ah, 02h INT 21h MOV dl, 10 ; print char MOV ah, 02h INT 21h pop ax pop dx cmp bl,60 je min jmp start min: xor bl,bl inc cl cmp cl,60 je h jmp start h: xor cl,cl inc dl cmp dl,24 je day jmp start day: xor dl,dl jmp start printANuminCH: push ax push dx xor ax, ax mov al, ch ;2 char mov dh, 100 ;1 char skipping this for now div dh add al, 30h MOV dl, al ; print char MOV ah, 02h INT 21h xor ax, ax mov al, ch ;2 char mov dh, 100 div dh mov al,ah xor ah,ah mov dh,10 div dh add al, 30h MOV dl, al ; print char MOV ah, 02h INT 21h xor ax, ax mov al, ch ;last char mov dh, 10 div dh add ah, 30h MOV dl, ah ; print char MOV ah, 02h INT 21h pop dx pop ax ret printANuminCHwithSpace: push dx push ax call printANuminCH MOV dl, 20h ; print char MOV ah, 02h INT 21h pop ax pop dx ret
      The displaying code isn't going to be there. Here's how it could look like when implemented: The ports should be replaced and represented by their appropriate value.org 100h xor cx,cx xor dx,dx start: inc ax cmp ax,0FFFFh ;clockspeed in hz je sec jmp start sec: xor ax,ax inc bl out bl,0h cmp bl,60 je min jmp start min: xor bl,bl inc cl out cl,1h cmp cl,60 je h jmp start h: xor cl,cl inc dl out dl,2h cmp dl,24 je day jmp start day: xor dl,dl jmp start
      Is there any good company, (europe should be best, I live in Sweden), that makes ROMs? How much could it cost. I don't want to use to much money. I need 17 outputs, do I need a multiplexer? Where could I get one? How is the machine code in the C64? Thanks in advance Niklas Ulvinge

      D Offline
      D Offline
      Douglas Troy
      wrote on last edited by
      #2

      Radio Shack used to sell ROMS (EPROMS) and the burners - but that was ages ago ... perhaps you can look on-line?


      :..::. Douglas H. Troy ::..
      Fold with us|Development Blogging|viksoe.dk's site

      N 1 Reply Last reply
      0
      • D Douglas Troy

        Radio Shack used to sell ROMS (EPROMS) and the burners - but that was ages ago ... perhaps you can look on-line?


        :..::. Douglas H. Troy ::..
        Fold with us|Development Blogging|viksoe.dk's site

        N Offline
        N Offline
        Niklas Ulvinge
        wrote on last edited by
        #3

        Do you remmember any prise? It should be cheeper now or more expensive... Thanks for your reply anyway Niklas Ulvinge aka IDK

        D 1 Reply Last reply
        0
        • N Niklas Ulvinge

          Do you remmember any prise? It should be cheeper now or more expensive... Thanks for your reply anyway Niklas Ulvinge aka IDK

          D Offline
          D Offline
          Douglas Troy
          wrote on last edited by
          #4

          No, sorry I don't ... but if you go to Google and search for EPROMs and/or IC chips, you'll probably find a company that "deals" in that type of thing ...


          :..::. Douglas H. Troy ::..
          Fold with us|Development Blogging|viksoe.dk's site

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups