Merge git://github.com/leachim6/hello-world
sync with upstream
This commit is contained in:
1
a/AntLang.ant
Normal file
1
a/AntLang.ant
Normal file
@@ -0,0 +1 @@
|
||||
"Hello World"
|
||||
6
a/aiml.aiml
Normal file
6
a/aiml.aiml
Normal file
@@ -0,0 +1,6 @@
|
||||
<aiml>
|
||||
<category>
|
||||
<pattern>*</pattern>
|
||||
<template>Hello World!</template>
|
||||
</category>
|
||||
</aiml>
|
||||
@@ -1,11 +1,4 @@
|
||||
|
||||
void setup()
|
||||
{
|
||||
void setup(){
|
||||
Serial.begin(9600);
|
||||
Serial.println("Hello world!");
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
50
a/assembler_8048_videopac.asm
Normal file
50
a/assembler_8048_videopac.asm
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
; Hello World for Philips Videopac (Magnavox Odyssey 2)
|
||||
; by Frog ( https://github.com/petersobolev )
|
||||
; 25 July 2016
|
||||
|
||||
cpu 8048
|
||||
org 400h
|
||||
|
||||
; interrupt vectors
|
||||
jmp 02C3h ; selectgame (RESET)
|
||||
jmp 0009h ; irq
|
||||
jmp timer ; timer
|
||||
jmp 001Ah ; vsyncirq
|
||||
jmp start ; after selectgame
|
||||
jmp 0044h ; soundirq
|
||||
|
||||
timer:
|
||||
ret ; no timer needed
|
||||
|
||||
|
||||
start:
|
||||
|
||||
call 011Ch ; gfxoff
|
||||
|
||||
mov r0,#010h ; pointer in VDC - which char to display (one of 12)
|
||||
mov r3,#40 ; x
|
||||
mov r4,#100 ; y
|
||||
mov r1,#hellostr & 0ffh ; string to print (should be on same 255 bytes page)
|
||||
|
||||
mov r2,#11 ; string length
|
||||
|
||||
nextchar:
|
||||
mov a,r1
|
||||
movp a,@a ; get char located at @r1
|
||||
mov r5,a
|
||||
inc r1 ; inc addr of char
|
||||
mov r6,#0eh ; white color
|
||||
call 03EAh ; printchar bios subroutine (increases r0, r3)
|
||||
djnz r2,nextchar
|
||||
|
||||
call 0127h ; gfxon (show what is written to VDC)
|
||||
|
||||
|
||||
loop:
|
||||
jmp loop ; just wait and do nothing
|
||||
|
||||
; 'HELLO WORLD' (ascii not supported by assembler)
|
||||
hellostr:
|
||||
db 01dh, 012h, 00eh, 00eh, 017h, 00ch, 011h, 017h, 013h, 00eh, 01ah
|
||||
|
||||
35
a/assembler_masm_win32.asm
Normal file
35
a/assembler_masm_win32.asm
Normal file
@@ -0,0 +1,35 @@
|
||||
; ---------------------------------------------
|
||||
; Hello World for Win32 Intel x86 Assembly
|
||||
;
|
||||
; by fruel (https://github.com/fruel)
|
||||
; 13 June 2016
|
||||
; ---------------------------------------------
|
||||
|
||||
.386
|
||||
.model flat,stdcall
|
||||
.stack 4096
|
||||
|
||||
EXTRN ExitProcess@4 : PROC
|
||||
EXTRN GetStdHandle@4 : PROC
|
||||
EXTRN WriteConsoleA@20 : PROC
|
||||
|
||||
.data
|
||||
msg BYTE "Hello World!",0
|
||||
bytesWritten DWORD ?
|
||||
|
||||
.code
|
||||
main PROC
|
||||
push -11 ; nStdHandle (STD_OUTPUT_HANDLE)
|
||||
call GetStdHandle@4
|
||||
|
||||
push 0 ; lpReserved
|
||||
push OFFSET bytesWritten ; lpNumberOfCharsWritten
|
||||
push LENGTHOF msg - 1 ; nNumberOfCharsToWrite
|
||||
push OFFSET msg ; *lpBuffer
|
||||
push eax ; hConsoleOutput
|
||||
call WriteConsoleA@20
|
||||
|
||||
push 0 ; uExitCode
|
||||
call ExitProcess@4
|
||||
main ENDP
|
||||
END main
|
||||
33
a/assembler_masm_win64.asm
Normal file
33
a/assembler_masm_win64.asm
Normal file
@@ -0,0 +1,33 @@
|
||||
; ---------------------------------------------
|
||||
; Hello World for Win64 Intel x64 Assembly
|
||||
;
|
||||
; by fruel (https://github.com/fruel)
|
||||
; 13 June 2016
|
||||
; ---------------------------------------------
|
||||
|
||||
GetStdHandle PROTO
|
||||
ExitProcess PROTO
|
||||
WriteConsoleA PROTO
|
||||
|
||||
.data
|
||||
msg BYTE "Hello World!",0
|
||||
bytesWritten DWORD ?
|
||||
|
||||
.code
|
||||
main PROC
|
||||
sub rsp, 5 * 8 ; reserve shadow space
|
||||
|
||||
mov rcx, -11 ; nStdHandle (STD_OUTPUT_HANDLE)
|
||||
call GetStdHandle
|
||||
|
||||
mov rcx, rax ; hConsoleOutput
|
||||
lea rdx, msg ; *lpBuffer
|
||||
mov r8, LENGTHOF msg - 1 ; nNumberOfCharsToWrite
|
||||
lea r9, bytesWritten ; lpNumberOfCharsWritten
|
||||
mov QWORD PTR [rsp + 4 * SIZEOF QWORD], 0 ; lpReserved
|
||||
call WriteConsoleA
|
||||
|
||||
mov rcx, 0 ; uExitCode
|
||||
call ExitProcess
|
||||
main ENDP
|
||||
END
|
||||
20
a/assembler_tasm_dos.asm
Normal file
20
a/assembler_tasm_dos.asm
Normal file
@@ -0,0 +1,20 @@
|
||||
IDEAL
|
||||
MODEL SMALL
|
||||
STACK 100h
|
||||
|
||||
DATASEG
|
||||
msg db "Hello World!", 0dh, 0ah, "$"
|
||||
|
||||
CODESEG
|
||||
start:
|
||||
mov ax, @data
|
||||
mov ds, ax
|
||||
|
||||
mov dx, offset msg
|
||||
mov ah, 9
|
||||
int 21h
|
||||
|
||||
mov ah, 4ch
|
||||
int 21h
|
||||
|
||||
end start
|
||||
13
a/assembler_vax_ultrix.asm
Normal file
13
a/assembler_vax_ultrix.asm
Normal file
@@ -0,0 +1,13 @@
|
||||
.data
|
||||
hw:
|
||||
.ascii "Hello World!\12"
|
||||
.text
|
||||
.align 1
|
||||
.globl _main
|
||||
_main:
|
||||
.word 0
|
||||
pushl $13
|
||||
pushab hw
|
||||
pushl $1
|
||||
calls $3,_write
|
||||
ret
|
||||
Reference in New Issue
Block a user