191 Comments
- CSharpSauce, on 05/04/2008, -15/+276dugg... simply for this
Assembler-Z80-Console
; This is a "Hello World" program for Z80 and TMS9918 / TMS9928 / TMS9929 /
; V9938 or V9958 VDP.
; That means that this should work on SVI, MSX, Colecovision, Memotech,
; and many other Z80 based home computers or game consoles.
;
; Because we don't know what system is used, we don't know where RAM
; is, so we can't use stack in this program.
;
; This version of Hello World was written by Timo "NYYRIKKI" Soilamaa
; 17.10.2001
;
;----------------------------------------------------------------------
; Configure this part:
DATAP: EQU #98 ; VDP Data port #98 works on all MSX models
; (TMS9918/TMS9929/V9938 or V9958)
; #80 works on SVI
; (for other platforms you have to figure this out by your self)
CMDP: EQU #99 ; VDP Command port #99 works on all MSX models
; (TMS9918/TMS9929/V9938 or V9958)
; #81 works on SVI
; (for other platforms you have to figure this out by your self)
;-----------------------------------------------------------------------
; Program starts here:
ORG 0 ; Z80 starts always from here when power is turned on
DI ; We don't know, how interrupts works in this system, so we disable them.
; Let's set VDP write address to #0000
XOR A
OUT (CMDP),A
LD A,#40
OUT (CMDP),A
; Now let's clear first 16Kb of VDP memory
LD B,0
LD HL,#3FFF
LD C,DATAP
CLEAR:
OUT (C),B
DEC HL
LD A,H
OR L
NOP ; Let's wait 8 clock cycles just in case VDP is not quick enough.
NOP
JR NZ,CLEAR
; Now it is time to set up VDP registers:
;----------------------------------------
; Register 0 to #0
;
; Set mode selection bit M3 (maybe also M4 & M5) to zero and
; disable external video & horizontal interrupt
LD C,CMDP
LD E,#80
OUT (C),A
OUT (C),E
;----------------------------------------
; Register 1 to #50
;
; Select 40 column mode, enable screen and disable vertical interrupt
LD A,#50
INC E
OUT (C),A
OUT (C),E
;----------------------------------------
; Register 2 to #0
;
; Set pattern name table to #0000
XOR A
INC E
OUT (C),A
OUT (C),E
;----------------------------------------
; Register 3 is ignored as 40 column mode does not need color table
;
INC E
;----------------------------------------
; Register 4 to #1
; Set pattern generator table to #800
INC A
INC E
OUT (C),A
OUT (C),E
;----------------------------------------
; Registers 5 (Sprite attribute) & 6 (Sprite pattern) are ignored
; as 40 column mode does not have sprites
INC E
INC E
;----------------------------------------
; Register 7 to #F0
; Set colors to white on black
LD A,#F0
INC E
OUT (C),A
OUT (C),E
;----------------------------------------
; Let's set VDP write address to #808 so, that we can write
; character set to memory
; (No need to write SPACE it is clear char already)
LD A,8
OUT (C),A
LD A,#48
OUT (C),A
; Let's copy character set
LD HL,CHARS
LD B, CHARS_END-CHARS
COPYCHARS:
LD A,(HL)
OUT (DATAP),A
INC HL
NOP ; Let's wait 8 clock cycles just in case VDP is not quick enough.
NOP
DJNZ COPYCHARS
; Let's set write address to start of name table
XOR A
OUT (C),A
LD A,#40
OUT (C),A
; Let's put characters to screen
LD HL,ORDER
LD B,ORDER_END-ORDER
COPYORDER:
LD A,(HL)
OUT (DATAP),A
INC HL
JR OVERNMI
NOP
NOP
; Here is address #66, that is entry for NMI
RETN ;Return from NMI
OVERNMI:
DJNZ COPYORDER
; The end
HALT
; Character set:
; --------------
ORDER:
DEFB 1,2,3,3,4,0,5,4,6,3,7
ORDER_END:
CHARS:
; H
DEFB %10001000
DEFB %10001000
DEFB %10001000
DEFB %11111000
DEFB %10001000
DEFB %10001000
DEFB %10001000
DEFB %00000000
; e
DEFB %00000000
DEFB %00000000
DEFB %01110000
DEFB %10001000
DEFB %11111000
DEFB %10000000
DEFB %01110000
DEFB %00000000
; l
DEFB %01100000
DEFB %00100000
DEFB %00100000
DEFB %00100000
DEFB %00100000
DEFB %00100000
DEFB %01110000
DEFB %00000000
; o
DEFB %00000000
DEFB %00000000
DEFB %01110000
DEFB %10001000
DEFB %10001000
DEFB %10001000
DEFB %01110000
DEFB %00000000
; W
DEFB %10001000
DEFB %10001000
DEFB %10001000
DEFB %10101000
DEFB %10101000
DEFB %11011000
DEFB %10001000
DEFB %00000000
; r
DEFB %00000000
DEFB %00000000
DEFB %10110000
DEFB %11001000
DEFB %10000000
DEFB %10000000
DEFB %10000000
DEFB %00000000
; d
DEFB %00001000
DEFB %00001000
DEFB %01101000
DEFB %10011000
DEFB %10001000
DEFB %10011000
DEFB %01101000
DEFB %00000000
chars_end:
HOLY *****!!!! - rpieszak, on 05/04/2008, -7/+211Dugg for LOLCODE
-- BTW Hello World in LOLCODE
-- HAI
-- CAN HAS STDIO?
-- VISIBLE "HAI WORLD!"
-- KTHXBYE - grumpyrain, on 05/04/2008, -3/+58Also, 99 bottles of beer song in hundreds of programming languages:
http://99-bottles-of-beer.net/ - synyster, on 05/04/2008, -0/+48my eyes hurts
print "hello world" FTW - marx2k, on 05/04/2008, -2/+41LOLCODE is teh futurez
- Myztry, on 05/04/2008, -0/+37Ouch. That's some ugly assembly. I like the Assembler-68000-Amiga except their is a typo for option B - it should read jsr -$03B4(a6)
Interesting to note that this will give a graphical hello world without even having Workbench (Desktop) started. The Amiga (1985) didn't even have a character mapped display mode. It was entirely GUI based. - marksmayo, on 05/04/2008, -1/+33A quick search would provide evidence:
http://en.wikipedia.org/wiki/*****
I think the point is that when you learn Swing, which is usually learnt separately from learning Java - you need to start with the basics - making a quick message dialog :) But I'll give that one to you in terms of it not being a distinct language. - OneLess, on 05/04/2008, -1/+31print "Hello world"
Go Python :D - grimlenn, on 05/04/2008, -0/+27I think they forgot a ONEONEZERO after the 158th ZERO.
- itsfini, on 05/04/2008, -22/+48why...just why..
- grumpyrain, on 05/04/2008, -1/+26Because it's there.
- Erowid, on 05/04/2008, -0/+20Where have you been for the past year? I would argue that LOLPYTHON is the most elegant programming language ever conceived.
- SteveMax, on 05/04/2008, -0/+17DEFB 1,2,3,3,4,0,5,4,6,3,7
He doesn't have to define "l" and "o" more than once, he just calls them more than once. It spells "Hello world" correctly. - gllopc, on 05/04/2008, -1/+18msgbox "why...just why.."
- dotnetperls, on 05/04/2008, -4/+20Wow, now I know Java, thanks
- TheSeptimHeir, on 05/04/2008, -2/+17Real men program in Assembler-Z80-Console.
- lilmoder, on 05/04/2008, -2/+160_o
BIT
Hello World in BIT.
No comments possible.
LINENUMBERZEROCODEPRINTZEROGOTOONELINENUMBERONECODEPRINTONEGOTOONEZEROLINENUMBE
RONEZEROCODEPRINTZEROGOTOONEONELINENUMBERONEONECODEPRINTZEROGOTOONEZEROZEROLINE
NUMBERONEZEROZEROCODEPRINTONEGOTOONEZEROONELINENUMBERONEZEROONECODEPRINTZEROGOT
OONEONEZEROLINENUMBERONEONEZEROCODEPRINTZEROGOTOONEONEONELINENUMBERONEONEONECOD
EPRINTZEROGOTOONEZEROZEROZEROLINENUMBERONEZEROZEROZEROCODEPRINTZEROGOTOONEZEROZ
EROONELINENUMBERONEZEROZEROONECODEPRINTONEGOTOONEZEROONEZEROLINENUMBERONEZEROON
EZEROCODEPRINTONEGOTOONEZEROONEONELINENUMBERONEZEROONEONECODEPRINTZEROGOTOONEON
EZEROZEROLINENUMBERONEONEZEROZEROCODEPRINTZEROGOTOONEONEZEROONELINENUMBERONEONE
ZEROONECODEPRINTONEGOTOONEONEONEZEROLINENUMBERONEONEONEZEROCODEPRINTZEROGOTOONE
ONEONEONELINENUMBERONEONEONEONECODEPRINTONEGOTOONEZEROZEROZEROZEROLINENUMBERONE
ZEROZEROZEROZEROCODEPRINTZEROGOTOONEZEROZEROZEROONELINENUMBERONEZEROZEROZEROONE
CODEPRINTONEGOTOONEZEROZEROONEZEROLINENUMBERONEZEROZEROONEZEROCODEPRINTONEGOTOO
NEZEROZEROONEONELINENUMBERONEZEROZEROONEONECODEPRINTZEROGOTOONEZEROONEZEROZEROL
INENUMBERONEZEROONEZEROZEROCODEPRINTONEGOTOONEZEROONEZEROONELINENUMBERONEZEROON
EZEROONECODEPRINTONEGOTOONEZEROONEONEZEROLINENUMBERONEZEROONEONEZEROCODEPRINTZE
ROGOTOONEZEROONEONEONELINENUMBERONEZEROONEONEONECODEPRINTZEROGOTOONEONEZEROZERO
ZEROLINENUMBERONEONEZEROZEROZEROCODEPRINTZEROGOTOONEONEZEROZEROONELINENUMBERONE
ONEZEROZEROONECODEPRINTONEGOTOONEONEZEROONEZEROLINENUMBERONEONEZEROONEZEROCODEP
RINTONEGOTOONEONEZEROONEONELINENUMBERONEONEZEROONEONECODEPRINTZEROGOTOONEONEONE
ZEROZEROLINENUMBERONEONEONEZEROZEROCODEPRINTONEGOTOONEONEONEZEROONELINENUMBERON
EONEONEZEROONECODEPRINTONEGOTOONEONEONEONEZEROLINENUMBERONEONEONEONEZEROCODEPRI
NTZEROGOTOONEONEONEONEONELINENUMBERONEONEONEONEONECODEPRINTZEROGOTOONEZEROZEROZ
EROZEROZEROLINENUMBERONEZEROZEROZEROZEROZEROCODEPRINTZEROGOTOONEZEROZEROZEROZER
OONELINENUMBERONEZEROZEROZEROZEROONECODEPRINTONEGOTOONEZEROZEROZEROONEZEROLINEN
UMBERONEZEROZEROZEROONEZEROCODEPRINTONEGOTOONEZEROZEROZEROONEONELINENUMBERONEZE
ROZEROZEROONEONECODEPRINTZEROGOTOONEZEROZEROONEZEROZEROLINENUMBERONEZEROZEROONE
ZEROZEROCODEPRINTONEGOTOONEZEROZEROONEZEROONELINENUMBERONEZEROZEROONEZEROONECOD
EPRINTONEGOTOONEZEROZEROONEONEZEROLINENUMBERONEZEROZEROONEONEZEROCODEPRINTONEGO
TOONEZEROZEROONEONEONELINENUMBERONEZEROZEROONEONEONECODEPRINTONEGOTOONEZEROONEZ
EROZEROZEROLINENUMBERONEZEROONEZEROZEROZEROCODEPRINTZEROGOTOONEZEROONEZEROZEROO
NELINENUMBERONEZEROONEZEROZEROONECODEPRINTZEROGOTOONEZEROONEZEROONEZEROLINENUMB
ERONEZEROONEZEROONEZEROCODEPRINTONEGOTOONEZEROONEZEROONEONELINENUMBERONEZEROONE
ZEROONEONECODEPRINTZEROGOTOONEZEROONEONEZEROZEROLINENUMBERONEZEROONEONEZEROZERO
CODEPRINTZEROGOTOONEZEROONEONEZEROONELINENUMBERONEZEROONEONEZEROONECODEPRINTZER
OGOTOONEZEROONEONEONEZEROLINENUMBERONEZEROONEONEONEZEROCODEPRINTZEROGOTOONEZERO
ONEONEONEONELINENUMBERONEZEROONEONEONEONECODEPRINTZEROGOTOONEONEZEROZEROZEROZER
OLINENUMBERONEONEZEROZEROZEROZEROCODEPRINTZEROGOTOONEONEZEROZEROZEROONELINENUMB
ERONEONEZEROZEROZEROONECODEPRINTONEGOTOONEONEZEROZEROONEZEROLINENUMBERONEONEZER
OZEROONEZEROCODEPRINTONEGOTOONEONEZEROZEROONEONELINENUMBERONEONEZEROZEROONEONEC
ODEPRINTONEGOTOONEONEZEROONEZEROZEROLINENUMBERONEONEZEROONEZEROZEROCODEPRINTZER
OGOTOONEONEZEROONEZEROONELINENUMBERONEONEZEROONEZEROONECODEPRINTONEGOTOONEONEZE
ROONEONEZEROLINENUMBERONEONEZEROONEONEZEROCODEPRINTONEGOTOONEONEZEROONEONEONELI
NENUMBERONEONEZEROONEONEONECODEPRINTONEGOTOONEONEONEZEROZEROZEROLINENUMBERONEON
EONEZEROZEROZEROCODEPRINTZEROGOTOONEONEONEZEROZEROONELINENUMBERONEONEONEZEROZER
OONECODEPRINTONEGOTOONEONEONEZEROONEZEROLINENUMBERONEONEONEZEROONEZEROCODEPRINT
ONEGOTOONEONEONEZEROONEONELINENUMBERONEONEONEZEROONEONECODEPRINTZEROGOTOONEONEO
NEONEZEROZEROLINENUMBERONEONEONEONEZEROZEROCODEPRINTONEGOTOONEONEONEONEZEROONEL
INENUMBERONEONEONEONEZEROONECODEPRINTONEGOTOONEONEONEONEONEZEROLINENUMBERONEONE
ONEONEONEZEROCODEPRINTONEGOTOONEONEONEONEONEONELINENUMBERONEONEONEONEONEONECODE
PRINTONEGOTOONEZEROZEROZEROZEROZEROZEROLINENUMBERONEZEROZEROZEROZEROZEROZEROCOD
EPRINTZEROGOTOONEZEROZEROZEROZEROZEROONELINENUMBERONEZEROZEROZEROZEROZEROONECOD
EPRINTONEGOTOONEZEROZEROZEROZEROONEZEROLINENUMBERONEZEROZEROZEROZEROONEZEROCODE
PRINTONEGOTOONEZEROZEROZEROZEROONEONELINENUMBERONEZEROZEROZEROZEROONEONECODEPRI
NTONEGOTOONEZEROZEROZEROONEZEROZEROLINENUMBERONEZEROZEROZEROONEZEROZEROCODEPRIN
TZEROGOTOONEZEROZEROZEROONEZEROONELINENUMBERONEZEROZEROZEROONEZEROONECODEPRINTZ
EROGOTOONEZEROZEROZEROONEONEZEROLINENUMBERONEZEROZEROZEROONEONEZEROCODEPRINTONE
GOTOONEZEROZEROZEROONEONEONELINENUMBERONEZEROZEROZEROONEONEONECODEPRINTZEROGOTO
ONEZEROZEROONEZEROZEROZEROLINENUMBERONEZEROZEROONEZEROZEROZEROCODEPRINTZEROGOTO
ONEZEROZEROONEZEROZEROONELINENUMBERONEZEROZEROONEZEROZEROONECODEPRINTONEGOTOONE
ZEROZEROONEZEROONEZEROLINENUMBERONEZEROZEROONEZEROONEZEROCODEPRINTONEGOTOONEZER
OZEROONEZEROONEONELINENUMBERONEZEROZEROONEZEROONEONECODEPRINTZEROGOTOONEZEROZER
OONEONEZEROZEROLINENUMBERONEZEROZEROONEONEZEROZEROCODEPRINTONEGOTOONEZEROZEROON
EONEZEROONELINENUMBERONEZEROZEROONEONEZEROONECODEPRINTONEGOTOONEZEROZEROONEONEO
NEZEROLINENUMBERONEZEROZEROONEONEONEZEROCODEPRINTZEROGOTOONEZEROZEROONEONEONEON
ELINENUMBERONEZEROZEROONEONEONEONECODEPRINTZEROGOTOONEZEROONEZEROZEROZEROZEROLI
NENUMBERONEZEROONEZEROZEROZEROZEROCODEPRINTZEROGOTOONEZEROONEZEROZEROZEROONELIN
ENUMBERONEZEROONEZEROZEROZEROONECODEPRINTONEGOTOONEZEROONEZEROZEROONEZEROLINENU
MBERONEZEROONEZEROZEROONEZEROCODEPRINTONEGOTOONEZEROONEZEROZEROONEONELINENUMBER
ONEZEROONEZEROZEROONEONECODEPRINTZEROGOTOONEZEROONEZEROONEZEROZEROLINENUMBERONE
ZEROONEZEROONEZEROZEROCODEPRINTZEROGOTOONEZEROONEZEROONEZEROONELINENUMBERONEZER
OONEZEROONEZEROONECODEPRINTONEGOTOONEZEROONEZEROONEONEZEROLINENUMBERONEZEROONEZ
EROONEONEZEROCODEPRINTZEROGOTOONEZEROONEZEROONEONEONELINENUMBERONEZEROONEZEROON
EONEONECODEPRINTZEROGOTOONEZEROONEONEZEROZEROZEROLINENUMBERONEZEROONEONEZEROZER
OZEROCODEPRINTZEROGOTOONEZEROONEONEZEROZEROONELINENUMBERONEZEROONEONEZEROZEROON
ECODEPRINTZEROGOTOONEZEROONEONEZEROONEZEROLINENUMBERONEZEROONEONEZEROONEZEROCOD
EPRINTONEGOTOONEZEROONEONEZEROONEONELINENUMBERONEZEROONEONEZEROONEONECODEPRINTZ
EROGOTOONEZEROONEONEONEZEROZEROLINENUMBERONEZEROONEONEONEZEROZEROCODEPRINTZEROG
OTOONEZEROONEONEONEZEROONELINENUMBERONEZEROONEONEONEZEROONECODEPRINTZEROGOTOONE
ZEROONEONEONEONEZEROLINENUMBERONEZEROONEONEONEONEZEROCODEPRINTZEROGOTOONEZEROON
EONEONEONEONELINENUMBERONEZEROONEONEONEONEONECODEPRINTONE - synyster, on 05/04/2008, -0/+14and spent most their life debugging
- drmangrum, on 05/04/2008, -0/+13There's a language called LOLCODE? Who the hell had that much time on their hands?
- kahrn, on 05/04/2008, -0/+11C++ QT? C++ FLTK? These are toolkits ffs!
- cajungator2, on 05/04/2008, -0/+10No, he forgot it after the 159th. Anyone can see that mistake.
- jamie191817, on 05/04/2008, -0/+10you not missing the closing ) for that print statement??
- inactive, on 05/04/2008, -1/+11seems that the hardest language is "Credits"
- inactive, on 05/04/2008, -0/+9I disagree. If it teaches you the basics of programming I'm all for it. I started out by learning how to code NPC's for a game called graal online. It may not be all that powerful, but it's a start and shouldn't be looked down upon.
- knight666, on 05/04/2008, -0/+9I don't know, how does DirectX programming, flexible syntax and built-in compiler sound to the 12-year old in you?
Game Maker started my love for programming too, and now I know GML as well as PHP, JavaScript, Python, AutoIt and VBScript.
Without Game Maker, I would never have been able to apply for a Game Programming course. - psykiv, on 05/04/2008, -0/+9Chef
Hello World Souffle.
This recipe prints the immortal words "Hello world!", in a basically brute force
way. It also makes a lot of food for one person.
Ingredients.
72 g haricot beans
101 eggs
108 g lard
111 cups oil
32 zucchinis
119 ml water
114 g red salmon
100 g dijon mustard
33 potatoes
Method.
Put potatoes into the mixing bowl. Put dijon mustard into the mixing bowl. Put
lard into the mixing bowl. Put red salmon into the mixing bowl. Put oil into
the mixing bowl. Put water into the mixing bowl. Put zucchinis into the mixing
bowl. Put oil into the mixing bowl. Put lard into the mixing bowl. Put lard
into the mixing bowl. Put eggs into the mixing bowl. Put haricot beans into
the mixing bowl. Liquefy contents of the mixing bowl. Pour contents of the
mixing bowl into the baking dish.
Serves 1.
Serves 1? For how long? a year? - diggeup, on 05/04/2008, -0/+8Did you see the program written in Shakespeare??? that is well funny..lol
- GorfTron, on 05/04/2008, -0/+8LOL Perl rocks
print "Hello World!n"; - fcukthisgame, on 05/04/2008, -0/+8pubic $response 'you said PUBIC!';
- jeffabs, on 05/04/2008, -1/+9***** is most certainly a language. Did a report on it in my 'programming languages' course in college
- specialK16, on 05/04/2008, -0/+7Argh!
Hello World in Argh!. No comment character exists.
j world
lppppppPPPPPPsrfj
hello, * j
qPh
WTF???? - TheDHC, on 05/04/2008, -0/+7GO REDTUBE!
- LavosPhoenix, on 05/04/2008, -2/+9Good job badmouthing ***** *****. Too bad it's a Turing Machine capable language that's far superior to anything you've ever come up with.
- diggrim, on 05/04/2008, -0/+7why not?
- Myztry, on 05/04/2008, -1/+8Doesn't GCC use an intermediate language? Straight assembly is trivial even to hand compile.
Most Assembly language to machine code is mainly just converting the text operating to an opcode. Seeing the bits in the opcode that represent the register in the arguments, and appending any data values.
I learnt 6502, 6809, 68000 and Z80 by poking opcodes. It only gets difficult with things like forward looking address branch where you don't know where they'll land yet... Thus the reason for 2 pass assembling.
Generated assembly tends to be full of macros, and nesting, and higher language convolutions. The 'Hello World' samples are all obviously hand generated and quite simple. - CCoe, on 05/04/2008, -0/+7What a brain *****.
- marksmayo, on 05/04/2008, -0/+6Err, no they didn't. See 2nd comment and responses.
- falafelkiosken, on 05/04/2008, -1/+7[[NSAlert alertWithMessageText: @"Hello World" defaultButton: nil alternateButton: nil otherButton: nil informativeTextWithFormat: @""] runModal];
- sunsean, on 05/04/2008, -0/+6Quote thy Raven, 404.
- kingkoen, on 05/04/2008, -1/+6I miss the Cow programming language. Moo! (http://www.bigzaphod.org/cow/)
- blackjack75, on 05/04/2008, -0/+5"Who the hell had that much time on their hands?"
Cats. - Mark0Pon, on 05/04/2008, -0/+5Wow!
The Redcode one is mine!
http://mark0.net/soft-xrk-gallery.html
:) - canthraxp, on 05/04/2008, -0/+5It's ***** on orangutan.
http://esoteric.voxelperfect.net/wiki/Ook - balazsbela, on 05/04/2008, -0/+5Why not simply
while(1) { } ? - maddikp, on 05/04/2008, -1/+5Dugg for taking me back in the days I was learning to code and started with BASIC on a Tandy TSR 80.
- bigolblob, on 05/04/2008, -0/+4Just take out the parentheses at the end.
- linuxrocks2007, on 05/04/2008, -0/+4I think you meant this link: https://secure.wikimedia.org/wikipedia/en/wiki/Sha ...
- agimat, on 05/04/2008, -1/+5Someone forgot to add maximus mex/mecca script.
void() { print (COLOR_WHITE, "hello, world\n"; }
/groaaan. i feel ooold. - Dested, on 05/04/2008, -2/+6Dugg for GML.
Gamemaker started my love affair with programming. -
Show 51 - 100 of 191 discussions




What is Digg?