Jump to content

Hello world/Text: Difference between revisions

Add 8080 assembly version
m (→‎{{header|PepsiScript}}: "For typing:" now renders on a different line.)
(Add 8080 assembly version)
Line 104:
string .as "Hello world!",#13,#10,#0
.en</lang>
 
=={{header|8080 Assembly}}==
 
<lang 8080asm> ; This is Hello World, written in 8080 assembly to run under CP/M
; As you can see, it is similar to the 8086, and CP/M is very
; similar to DOS in the way it is called.
org 100h ; CP/M .COM entry point is 100h - like DOS
mvi c,9 ; C holds the syscall, 9 = print string - like DOS
lxi d,msg ; DE holds a pointer to the string
jmp 5 ; CP/M calls are accessed through the jump at 05h
; Normally you'd CALL it, but since you'd end the program by RETurning,
; JMP saves a byte (if you've only got 64k of address space you want to
; save bytes).
msg: db 'Hello world!$'</lang>
 
=={{header|8086 Assembly}}==
2,124

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.