User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 401,670 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,531 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 24913 | Replies: 90
Reply
Join Date: Feb 2005
Location: 55 26'N 118 46'W
Posts: 181
Reputation: Tight_Coder_Ex is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 13
Tight_Coder_Ex's Avatar
Tight_Coder_Ex Tight_Coder_Ex is offline Offline
Junior Poster

Re: A multilingual coded Hello World! thread

  #31  
Mar 22nd, 2005
Some pretty interesting stuff in this thread. I though I might step right out of the box and do something that can be put into the MBR (Master Boot Record) and copied to a floppy. I choose to provide the listing like this incase someone wanted to try it out without using an assembler. If you alread have a bootable floppy disk it would work just find.

First 3 bytes are memory address and the rest are opcodes for 386 or better
 
000 FA				 cli
001 FC				 cld
002 B8C007			 mov ax, 0x7c0
005 8ED8				 mov ds, ax
007 8EC0				 mov es, ax ; Setup segments to boot area
009 8ED0				 mov ss, ax
00B BCFFFF			 mov sp, 0xffff
00E FB					 sti
 
00F BD[2500]			 mov bp, Msg
012 B92000				mov cx, MsgLen
015 BA100A			 mov dx, 0x0a10 ; DH = Row (10), DL = Column (16)
018 B304				 mov bl, 4 ; Red
01A B80113			 mov ax, 0x1301 ; AH = Write String, AL = chars only
01D CD10				 int 0x10 ; Video serice call
 
01F 31C0				 xor ax, ax
021 CD16				 int 0x16 ; Wait for operators input
023 CD19				 int 0x19 ; Re-boot
 
025 48454C4C4F20574F52- Msg db 'HELLO WORLD', 13, 10, 'Any key to continue'
02E 4C440D0A416E79206B-
037 657920746F20636F6E-
040 74696E7565		 
						 MsgLen equ $ - Msg
 
045 90<rept>			times 510 - ($-$$) nop
1FE 55AA				db 0x55, 0xaa 
and the formatting is what it is. Cutting and pasting between code tags is probably the most cumbersome thing I've ever used.
Reply With Quote  
Join Date: Sep 2004
Posts: 6,059
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 419
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: A multilingual coded Hello World! thread

  #32  
Mar 22nd, 2005
>Well I downloaded tama and like nothing happened i tried running it and stuff and nothing happened
The driver expects a file with valid Tama script to be passed as a command line argument. For example:
$ tama source_file
It's also entirely possible that you're running the code with an IDE that closes the window immediately after the program finishes. In that case, search the C/C++ forum for how to fix it.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,425
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: A multilingual coded Hello World! thread

  #33  
Mar 24th, 2005
I wonder what ever happened to Modula2, once touted as theee super language!
MODULE Hello;

FROM InOut IMPORT WriteString, WriteLn;
BEGIN
  WriteString("Hello World! in Modula2");
  WriteLn;
END HelloWorld.
May 'the Google' be with you!
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,425
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: A multilingual coded Hello World! thread

  #34  
Mar 26th, 2005
The Ruby world has responded with a GUI Hello World!
[php]
require 'fox'

include Fox

theApp = FXApp.new

theMainWindow = FXMainWindow.new(theApp, "Hello World!",nil, nil, DECOR_ALL, 10, 10, 300, 100)
FXLabel.new(theMainWindow, " Hello World! using Ruby and fxRuby")
theApp.create

theMainWindow.show

theApp.run
[/php]
May 'the Google' be with you!
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,425
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: A multilingual coded Hello World! thread

  #35  
Mar 27th, 2005
I understand this is the A language that led to B then C. Correct me, if I am wrong ...
( # Hello # print(("Hello World! in Algol 68",newline)))
May 'the Google' be with you!
Reply With Quote  
Join Date: Sep 2004
Posts: 6,059
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 419
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: A multilingual coded Hello World! thread

  #36  
Mar 27th, 2005
>Correct me, if I am wrong ...
C is derived from B, which is derived from BCPL, which is derived from CPL, which is derived from Algol 60, which is rooted in FORTRAN derivatives.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,425
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: A multilingual coded Hello World! thread

  #37  
Mar 29th, 2005
Thanks Narue! Found the other ancestors but not CPL ...
// Hello world example in BCPL
GET "libhdr"

LET start() = VALOF
$( writes("Hello world*N")
   RESULTIS 0
$)

'BEGIN'
   'COMMENT' Hello World example in Algol 60;
    OUTPUT(4,'(''('Hello World!')',/')')
'END'
This dates me again, had that in punch-card college ...
       PROGRAM HWORLD
c
C      Hello World example in Fortran-IV
c
       WRITE (6,'('' Hello World!'')')
       END
May 'the Google' be with you!
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,425
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: A multilingual coded Hello World! thread

  #38  
Mar 31st, 2005
There was a time when the world belonged to ADA. At least the ADA programmers cogitated so.
with TEXT_IO;
use TEXT_IO;
procedure Hello is
  pragma MAIN;
begin
  PUT ("Hello World! in Ada");
end Hello;
May 'the Google' be with you!
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,425
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Solution Re: A multilingual coded Hello World! thread

  #39  
Apr 16th, 2005
The up and coming language ...
indexing "Hello"
class HELLO
creation
   run
feature
   run is
     local
       io : BASIC_IO;
     do
       !!io;
       io.put_string("Hello World! in Eiffel");
       io.put_newline;
     end;
end;
May 'the Google' be with you!
Reply With Quote  
Join Date: Jul 2004
Location: North East Indiana
Posts: 491
Reputation: Puckdropper is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 20
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: A multilingual coded Hello World! thread

  #40  
Apr 19th, 2005
There was a time when the world belonged to ADA. At least the ADA programmers cogitated so.
with TEXT_IO;
use TEXT_IO;
procedure Hello is
  pragma MAIN;
begin
  PUT ("Hello World! in Ada");
end Hello;

What does ADA stand for? American Dental Agency? Americans with Disabilities Act? What do they have to do with programming? It's Ada, not ADA. (Ada programmers tend to be picky about this.)

I'd write it differently:
with ada.Text_IO;

procedure hello_world is
begin
  Ada.Text_IO.put("Hello World!");
end hello_world;

But this program has you all beat:

Note:  There are no tabs in this file.  Set your line wrap to 80 columns.  Lines must end with
<CR><LF> Save as polyglot.com on a PC to run as an executable.  


                                                                         (*O/*_/
Cu  #%* )pop mark/CuG 4 def/# 2 def%%%%@@P[TX---P\P_SXPY!Ex(mx2ex("SX!Ex4P)Ex=
CuG #%*                                                                  *+Ex=
CuG #%*------------------------------------------------------------------*+Ex=
CuG #%*   POLYGLOT - a program in seven languages      15 February 1991  *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*   Written by Kevin Bungard, Peter Lisle, and Chris Tham          *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*   We have successfully run this program using the following:     *+Ex=
CuG #%*     ANSI COBOL:            MicroFocus COBOL85 (not COBOL74)      *+Ex=
CuG #%*     ISO  Pascal:           Turbo Pascal (DOS & Mac), Unix PC,    *+Ex=
CuG #%*                            AIX VS Pascal                         *+Ex=
CuG #%*     ANSI Fortran:          Unix f77, AIX VS Fortran              *+Ex=
CuG #%*     ANSI C (lint free):    Microsoft C, Unix CC, GCC, Turbo C++, *+Ex=
CuG #%*                            Think C (Mac)                         *+Ex=
CuG #%*     PostScript:            GoScript, HP/Adobe cartridge,         *+Ex=
CuG #%*                            Apple LaserWriter                     *+Ex=
CuG #%*     Shell script:          gnu bash, sh (SysV, BSD, MKS), ksh    *+Ex=
CuG #%*     8086 machine language: MS-DOS 2.00, 3.03, 4.01, 5.00 beta    *+Ex=
CuG #%*                            VPix & DOS Merge (under unix)         *+Ex=
CuG #%*                            SoftPC (on a Mac), MKS shell          *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*   Usage:                                                         *+Ex=
CuG #%*     1. Rename this file to polyglot.[cob|pas|f77|c|ps|sh|com]    *+Ex=
CuG #%*     2. Compile and/or run with appropriate compiler and          *+Ex=
CuG #%*        operating system                                          *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*   Notes:                                                         *+Ex=
CuG #%*     1. We have attempted to use only standard language features. *+Ex=
CuG #%*        Without the -traditional flag gcc will issue a warning.   *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*     2. This text is a comment block in all seven languages.      *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*     3. When run as a .COM file with MS-DOS it makes certain      *+Ex=
CuG #%*        (not unreasonable) assumptions about the contents of      *+Ex=
CuG #%*        the registers.                                            *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*     4. When transfering from Unix to DOS make sure that a LF     *+Ex=
CuG #%*        is correctly translated into a CR/LF.                     *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*   Please mail any comments, corrections or additions to          *+Ex=
CuG #%*   peril@extro.ucc.su.oz.au                                       *+Ex=
CuG #%*                                                                  *+Ex=
CuG #%*------------------------------------------------------------------*QuZ=
CuG #%*                                                                  *+Ex=
CuG #%*!Mx)ExQX4ZPZ4SP5n#5X!)Ex+ExPQXH,B+ExP[-9Z-9Z)GA(W@'UTTER_XYZZY'CPK*+
CuG #(*                                                                  *(
C   # */);                                                              /*(
C   # *)  program        polyglot (output);                             (*+
C   #     identification division.
C   #     program-id.    polyglot.
C   #
C   #     data           division.
C   #     procedure      division.
C   #
C   # * ))cleartomark   /Bookman-Demi findfont 36 scalefont setfont     (
C   # *                                                                 (
C   #
C   # *                  hello polyglots$
C   #     main.
C   #         perform
C     * ) 2>_$$; echo   "hello polyglots"; rm _$$; exit
              print
C             stop run.
     -*,                'hello polyglots'
C
C         print.
C             display   "hello polyglots".                              (
C     */  int i;                                                        /*
C     */  main () {                                                     /*
C     */      i=printf ("hello polyglots\n"); O= &i; return *O;         /*
C     *)                                                                (*
C     *)  begin                                                         (*
C     *)      writeln  ('hello polyglots');                             (*
C     *)                                                                (* )
C     * ) pop 60 360                                                    (
C     * ) pop moveto    (hello polyglots) show                          (
C     * ) pop showpage                                                  ((
C     *)
           end                                                          .(* )
C)pop%     program       polyglot.                                      *){*/}
Source: alt.msdos.programmer newsgroup (recently posted by Kevin Q. Quitt.):
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Legacy and Other Languages Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Legacy and Other Languages Forum

All times are GMT -4. The time now is 7:15 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC