HN user

RichWalton

35 karma

http://www.richwalton.co.uk :)

Posts0
Comments17
View on HN
No posts found.

My next project will be a "Cat poo detector" - this will live in the cat's litter tray and detect whatever gasses are released when it is used. This will be used so I can know if I can have a lazy weekend morning in bed or if I need to go downstairs and clean up.

I just finished hacking some "smart" behaviour into my old doorbell chime.

The sound of the chime ringing is picked up by a microphone connected to an arduino-like device. A small script is executed which results in my Alexa devices announcing that someone is at the door.

All the modifications / additional hardware fit inside the existing chime housing. It's been quite fun learning about electronics (For example, the chime is powered by 16v AC, but the microprocessor requires 5V DC) and writing the software for it (while admittedly is very simple) was challenging as I'm not familiar with C++.

Little Man Computer 11 years ago

Yes, correct :).

In the "Post Room Computer" analogy, the little man works in a post (mail) room.

The mailboxes are memory, in/out trays are IO, etc etc.

Little Man Computer 11 years ago

This is a nice implementation.

I made something similar [1], based on the Post Room Computer [2].

Basically it is a two address (operand) modification of the LMC. It was used to as a teaching tool for undergrad students at my local university.

It's a bit more fully featured - It supports absolute and register based address modes, macros, programs spanning multiple files. The computer is accessible via command line or using the in-built Java Swing UI.

If anyone is bored and wanted to run it, heres a sample program:

  ;; A simple multiplication program

  INP :x:		; Input value and store at location :x:
  INP :y:		; Input value and store at location :y:
  MOV :result: :x:	; Copy the value at :x: into :result:

  ; Multiplication loop
  :loop:		
	  SUB :y: :one:	; Substract 1 from the the value at :y:
	  JMP EQZ :end:	; If result of subtraction was 0, stop looping
	  ADD :result: :x:	; Add the value at :x: to the result
	
  ; If the program reaches this stage multiplication is not complete
  ; So jump back to start of loop
  JMP LWY :loop:

  :end:		; Label to exit the loop
  OUT :result:	; Output the result
  HLT		; Stop execution

  ; Data Stores
  :x: (0)
  :y: (0)
  :result: (0)
  :one: (1)
[1] https://github.com/Richard-Walton/The-Post-Room-Computer

[2] http://eprints.hud.ac.uk/2518/