The Daily Click ::. Forums ::. Non-Klik Coding Help ::. what program language is this ?
 

Post Reply  Post Oekaki 
 

Posted By Message

Test_Tube_Games



Registered
  29/03/2004
Points
  45
30th April, 2004 at 08:44:06 -

start: mov ah,9
mov dx,offset prompt
int 21h
mov di,offset kinput
nxt: mov ah,1
int 21h
cmp al,cr
je done
mov [di],al
inc di
jmp nxt
done: mov al,'$'
mov [di],al
call hello
mov ax,4c00h
int 21h

hello: mov ah,9
mov dx,offset hi
int 21h
mov ah,9
mov dx,offset kinput
int 21h
ret
END

cr EQU 0Dh
lf EQU 0Ah
kinput DB 50 DUP ()
prompt DB cr,lf,'Type in your name: ','$'
hi DB cr,lf,'Hello $'
END


my brother was given it as an example and he doesnt know what it is, please help him

 
Be gentle I am a complete newbie!

Lew



Registered
  06/01/2002
Points
  1014
30th April, 2004 at 08:52:20 -

Looks like assembly to me, the basis of all codes.

 
<--intelligent, witty comment here-->

Test_Tube_Games



Registered
  29/03/2004
Points
  45
30th April, 2004 at 08:55:21 -

I see, my brother has been asked to program a guessing game using it, so my next question is...

How hard is it to use and where can he get some online help to use it ?

 
Be gentle I am a complete newbie!

Lew



Registered
  06/01/2002
Points
  1014
30th April, 2004 at 09:07:19 -

It's fairly easy to use but hard to learn.
There's a basic tutorial here (search for others): http://www.drpaulcarter.com/pcasm/

You'll also need an assembly compiler (I think, I don't have much experience but I guess you will.)

 
<--intelligent, witty comment here-->

Ashman

Possibly Insane

Registered
  12/06/2002
Points
  3974
30th April, 2004 at 09:34:20 -

What you talking about Moe?

Moe = Impact_Designs

 
Show me the power child,
I'd like to say,
That I'm down on my knees today,
Gives me the butterflies,
Gives me away,
'Til I'm up on my feet again,
I'm feeling outshined.


"Outshined" - SoundGarden

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
30th April, 2004 at 11:04:19 -

Yes, that's Assembly. It's the lowest level programming language (other than machine code which isn't really a programming language), and therefore probably the most difficult (I haven't learnt it, I only know some basic principles). Using it is pretty hard, basically you're doing hardware-level commands with the processor - the nuts-and-bolts shifting memory in to processor registers, simple arithmatic commands and jumping around the code (no if statements or anything handy like that )
On the other hand, it's the fastest of all languages - it feeds directly in to the processor.

 
- Tigerworks

Imp of Hazard Games



Registered
  27/08/2003
Points
  781
30th April, 2004 at 12:12:54 -

Assembler for sure, look how small the commands are: mov, nxt, int, cmp, jmp...

 
I need painters, musicians and animators!

Galaxy613



Registered
  29/01/2003
Points
  1765
30th April, 2004 at 14:09:49 -

whoa... no if statements? it's like FISI you made(NOT to be confused with CFISI)

 
Image
My forum: http://subsoap.com/ck/forums/index.php

Capnzippy - (Smegsoft)



Registered
  11/02/2004
Points
  88
30th April, 2004 at 16:35:40 -

The only thing Assembly is good for is making little games to play on a TI83+ calculator...

 
klik-union -- http://www.klik-union.com
http://www.capnz.info

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
30th April, 2004 at 16:59:31 -

TI-83 BASIC is even better for those games(unless they actually have graphics).

I've made a BASIC platformer game on my calculator with 3 worlds. It still takes forever though.

 
n/a

Deleted User
1st May, 2004 at 03:15:47 -

"The only thing"? No! Assembly is also used for creating screen update parts of the 3d-engines in games, because they need to be very fast, many emulators are made using it etc...

Image Edited by the Author.

 

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
1st May, 2004 at 05:22:06 -

"if" statements go something like:

cmp ax,bx ; compare ax with bx
jne some_label ; jump if not equal
; "ax == bx" stuff goes here
some_label:
; the rest of the code

It's only faster because it doesn't include all the useless stuff that other languages like C & BASIC put in. i've tried inline assembly with PureBASIC (www.purebasic.com) which turns out slower than my Pure code because it's optimised so well (That's why the .exes are only ~5kb)

PS: shad, your code block thing is screwy

Image Edited by the Author.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
1st May, 2004 at 07:41:21 -

Assembly is also used for device drivers and things because it has direct low level control over hardware.

 
- Tigerworks

Sage



Registered
  02/01/2004
Points
  43
1st May, 2004 at 08:08:22 -

And it is as fast as a speeding Cheetah x2.
And actually machine code is actually somewhat of a programming language, because before that they had to plug/unplug wires from the computers to make it do things... Man those where the days...

 
-Sage

Galaxy613



Registered
  29/01/2003
Points
  1765
1st May, 2004 at 12:47:57 -

so basicly a program tells that computer what wires to unpulg/plug? weird/kool

 
Image
My forum: http://subsoap.com/ck/forums/index.php

vortex2



Registered
  27/05/2002
Points
  1406
2nd May, 2004 at 18:45:17 -

err not exactly.... now they use transistors and logic gates....

 
A bit of insanity with every bite!

Deleted User
3rd May, 2004 at 13:08:26 -

But in theory... yes.

 

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
3rd May, 2004 at 16:04:59 -

erm... most? I have to disagree with that - I'd say most commercial games (2d or 3d) are made in C++ with DirectX

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
3rd May, 2004 at 18:05:27 -

Depends when they were made. new stuff is all Direct X

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
4th May, 2004 at 15:03:55 -

Go back a few (10) years and they were made with assembly.

 
n/a

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
8th May, 2004 at 02:04:10 -

Psudo-Assembly, yeah. You'll need to get an interpreter/compiler. PCSpim is commonly used, just do a search for it and download.

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

gizmo



Registered
  15/03/2003
Points
  1206
13th May, 2004 at 05:55:12 -

Dont forget all OSes in the world begin with 512 Bytes of assembly language (The bootsector) This is before the fancy pants C++ or C

 
<signature> err... </signature>

Galaxy613



Registered
  29/01/2003
Points
  1765
13th May, 2004 at 22:33:21 -

512 letters/chararters? That doesn't seem like much...

 
Image
My forum: http://subsoap.com/ck/forums/index.php

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
14th May, 2004 at 08:25:41 -

i used assembly at college for a while (and got a merit for the assignment )

anyway i thought it was built into dos so you could access it on any computer with dos (and xp dos shell?)

 
.

gizmo



Registered
  15/03/2003
Points
  1206
14th May, 2004 at 08:50:40 -

512 Bytes compiled they are much smaller when in binary form.

resb 0x1FE+$$-$
db 0x55, 0xAA

Will nicely round up your bootsector ;P

 
<signature> err... </signature>

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
14th May, 2004 at 15:24:51 -

You can use the 'debug' program in XP and stuff, which is like Assembly, only worse (numbers instead of statements, for example)

 
gone fishin'

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
14th May, 2004 at 20:58:35 -

it was definitly assembly that we used.
ive still got the workbooks

infact i remember that to run our programs we had to use some old steam powered pcs because the other ones were too fast. (even though they were mostly 300 to 600mhz)

the programs flashed some leds on a board a few times yet it took about 10 minutes to type copy the stuff out of our books.

 
.

Galaxy613



Registered
  29/01/2003
Points
  1765
14th May, 2004 at 23:31:13 -

gizmo, what does
resb 0x1FE+$$-$ 

db 0x55, 0xAA
do excaly? does it start up the PC? And '0x1FE+$$-$' doesn't like any type of Hex I know of.

 
Image
My forum: http://subsoap.com/ck/forums/index.php

gizmo



Registered
  15/03/2003
Points
  1206
15th May, 2004 at 08:00:33 -

Its a nasm (Assembler compiler) specific code. (Nasm is used nearly always for all OS compiles) it basically tells it (After compiling, fill any space until its 512 bytes)

 
<signature> err... </signature>

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
12th July, 2004 at 18:53:03 -

Code it in C?

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
12th July, 2004 at 21:19:27 -

Yeah, code it in C and any low level assembly bits you need can be in asm{}.
But coding an OS is pretty damn difficult, which is why there aren't many unique ones. Main problem: Drivers. How do you know how to communicate with the computer's hardware unless the hardware manufacturer has written a driver specifically for your OS?

 
- Tigerworks

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
13th July, 2004 at 13:58:41 -

the core still needs to be in assembly, cos most Windows C compilers produce Win32 asm which isn't quite the same as x86 asm

you could always make it compatible with Windows drivers ... that'd be a bit of a sodder though

Image Edited by the Author.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
   

Post Reply



 



Advertisement

Worth A Click