Made by Hoang Nguyen
#include <iostream>
int main() {
std::cout << "Hello, World! I'm Hoang Nguyen, or as the compiler sees me, '01001000 01101111 01100001 01101110 01100111 00100000 01001110 01100111 01110101 01111001 01100101 01101110' in binary... just kidding! (Mostly.)" << std::endl;
return 0;
}
x86 Assembly (NASM syntax):
section .data
msg db 'Hello, World! Hoang Nguyen says, "MOV AX, 0x486F616E67; ...Wait, that\\'s just my name in hex."', 10, 0
section .text
global _start
_start:
mov eax, 4 ; system call for write
mov ebx, 1 ; file descriptor 1 (stdout)
mov ecx, msg ; pointer to message
mov edx, msg_len ; message length
int 0x80 ; call kernel
mov eax, 1 ; system call for exit
xor ebx, ebx ; exit code 0
int 0x80
msg_len equ $ - msg
ARM Assembly (GNU Assembler syntax):
.global _start
_start:
ldr r0, =message
bl printf
mov r7, #1
swi 0
.data
message:
.asciz "Hello, World! Hoang Nguyen here! If you were a CPU, I'd give you a hug... a very well-clocked hug.\\n"
.global printf
.extern printf
Ti BASIC (TI-84 Plus CE)
Disp "HELLO, WORLD!"
Disp "HOANG NGUYEN SAYS:"
Disp "IF YOU'RE A VARIABLE,"
Disp "I'M ASSIGNING YOU"
Disp "THE VALUE OF 'AWESOME'."
VHDL
library ieee;
use ieee.std_logic_1164.all;
entity hello_hoang is
port (
clk : in std_logic;
reset : in std_logic;
message : out std_logic_vector(7 downto 0)
);
end entity hello_hoang;
architecture behavioral of hello_hoang is
signal count : integer range 0 to 1000000 := 0;
begin
process (clk, reset)
begin
if reset = '1' then
message <= "00000000";
count <= 0;
elsif rising_edge(clk) then
count <= count + 1;
if count = 500000 then
message <= "48656C6C"; -- "Hell"
elsif count = 1000000 then
message <= "6F20576F"; -- "o Wo"
else
message <= message;
end if;
end if;
end process;
Verilog
module hello_hoang (
input clk,
input reset,
output reg [7:0] message
);
reg [20:0] count;
always @(posedge clk or posedge reset) begin
if (reset) begin
message <= 8'h00;
count <= 0;
end else begin
count <= count + 1;
if (count == 1000000) begin
message <= 8'h48; // "H"
end else if (count == 2000000) begin
message <= 8'h6F; // "o"
end else begin
message <= message;
end
end
end
endmodule