Fix Assembly files (#999)
This commit is contained in:
@@ -7,5 +7,5 @@ in:
|
|||||||
lda hello,y
|
lda hello,y
|
||||||
bne loop
|
bne loop
|
||||||
rts
|
rts
|
||||||
hello: .tx "Hello World!"
|
hello: .tx "Hello World"
|
||||||
.by 13,10,0
|
.by 13,10,0
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ loop:
|
|||||||
|
|
||||||
; Text data ($80 - end of line)
|
; Text data ($80 - end of line)
|
||||||
|
|
||||||
helloworld: db 'HELLO WORLD!',$80
|
helloworld: db 'Hello World',$80
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
jmp $
|
jmp $
|
||||||
|
|
||||||
HelloWorld db "Hello world!",0xD,0xA,0
|
HelloWorld db "Hello World",0xD,0xA,0
|
||||||
|
|
||||||
print_string:
|
print_string:
|
||||||
mov ah,0xE
|
mov ah,0xE
|
||||||
@@ -19,4 +19,4 @@ print_string:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
times 510-($-$$) db 0
|
times 510-($-$$) db 0
|
||||||
dw 0xAA55
|
dw 0xAA55
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
MSGAREA EQU * Message Area
|
MSGAREA EQU * Message Area
|
||||||
DC AL2(19) Total area length = 19 (Prefix length:4 + Data Length:15)
|
DC AL2(19) Total area length = 19 (Prefix length:4 + Data Length:15)
|
||||||
DC XL2'00' 2 bytes binary of zeros
|
DC XL2'00' 2 bytes binary of zeros
|
||||||
DC C'Hello world!' Text to be written to system console
|
DC C'Hello World' Text to be written to system console
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
.stack 100h
|
.stack 100h
|
||||||
|
|
||||||
.data
|
.data
|
||||||
msg db "Hello World!",'$'
|
msg db "Hello World",'$'
|
||||||
|
|
||||||
.code
|
.code
|
||||||
main proc
|
main proc
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.model small
|
.model small
|
||||||
.stack
|
.stack
|
||||||
.data
|
.data
|
||||||
message db "Hello world!", "$"
|
message db "Hello World", "$"
|
||||||
.code
|
.code
|
||||||
main proc
|
main proc
|
||||||
mov ax,seg message
|
mov ax,seg message
|
||||||
@@ -14,4 +14,4 @@
|
|||||||
mov ax,4c00h
|
mov ax,4c00h
|
||||||
int 21h
|
int 21h
|
||||||
main endp
|
main endp
|
||||||
end main
|
end main
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ EXTRN GetStdHandle@4 : PROC
|
|||||||
EXTRN WriteConsoleA@20 : PROC
|
EXTRN WriteConsoleA@20 : PROC
|
||||||
|
|
||||||
.data
|
.data
|
||||||
msg BYTE "Hello World!",0
|
msg BYTE "Hello World",0
|
||||||
bytesWritten DWORD ?
|
bytesWritten DWORD ?
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ ExitProcess PROTO
|
|||||||
WriteConsoleA PROTO
|
WriteConsoleA PROTO
|
||||||
|
|
||||||
.data
|
.data
|
||||||
msg BYTE "Hello World!",0
|
msg BYTE "Hello World",0
|
||||||
bytesWritten DWORD ?
|
bytesWritten DWORD ?
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.data
|
.data
|
||||||
hw: .asciiz "Hello, World!"
|
hw: .asciiz "Hello World"
|
||||||
.text
|
.text
|
||||||
main:
|
main:
|
||||||
la $a0, hw #load the address of hw into $a0
|
la $a0, hw #load the address of hw into $a0
|
||||||
|
|||||||
@@ -27,5 +27,5 @@ _start: ;tell linker entry point
|
|||||||
;there's no need to clean stack
|
;there's no need to clean stack
|
||||||
section .data
|
section .data
|
||||||
|
|
||||||
msg db "Hello, world!",0xa ;our string
|
msg db "Hello World",0xa ;our string
|
||||||
len equ $ - msg ;length of our string
|
len equ $ - msg ;length of our string
|
||||||
|
|||||||
@@ -16,5 +16,5 @@ _start: ;tell linker entry point
|
|||||||
|
|
||||||
section .rodata
|
section .rodata
|
||||||
|
|
||||||
msg db 'Hello, world!',0xa ;our string
|
msg db 'Hello World',0xa ;our string
|
||||||
len equ $ - msg ;length of our string
|
len equ $ - msg ;length of our string
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ start:
|
|||||||
syscall
|
syscall
|
||||||
|
|
||||||
section .data
|
section .data
|
||||||
msg: db "Hello, World!", 10
|
msg: db "Hello World", 10
|
||||||
.len: equ $ - msg
|
.len: equ $ - msg
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ section .text
|
|||||||
add esp,4
|
add esp,4
|
||||||
ret
|
ret
|
||||||
section .data
|
section .data
|
||||||
msg: db "Hello world",0Ah,0
|
msg: db "Hello World",0Ah,0
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ MODEL SMALL
|
|||||||
STACK 100h
|
STACK 100h
|
||||||
|
|
||||||
DATASEG
|
DATASEG
|
||||||
msg db "Hello World!", 0dh, 0ah, "$"
|
msg db "Hello World", 0dh, 0ah, "$"
|
||||||
|
|
||||||
CODESEG
|
CODESEG
|
||||||
start:
|
start:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.data
|
.data
|
||||||
hw:
|
hw:
|
||||||
.ascii "Hello World!\12"
|
.ascii "Hello World\12"
|
||||||
.text
|
.text
|
||||||
.align 1
|
.align 1
|
||||||
.globl _main
|
.globl _main
|
||||||
|
|||||||
@@ -15,6 +15,6 @@
|
|||||||
B_CALL(_NewLine)
|
B_CALL(_NewLine)
|
||||||
ret
|
ret
|
||||||
text:
|
text:
|
||||||
.db "Hello, World",0
|
.db "Hello World",0
|
||||||
.end
|
.end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -17,5 +17,5 @@ EXIT
|
|||||||
SCR equ 16384
|
SCR equ 16384
|
||||||
|
|
||||||
STRING
|
STRING
|
||||||
defb "Hello World!"
|
defb "Hello World"
|
||||||
defb 13, 0
|
defb 13, 0
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ program HelloWorld;
|
|||||||
#include( "stdlib.hhf" );
|
#include( "stdlib.hhf" );
|
||||||
|
|
||||||
begin HelloWorld;
|
begin HelloWorld;
|
||||||
stdout.put( "Hello, world!", nl );
|
stdout.put( "Hello World", nl );
|
||||||
end HelloWorld;
|
end HelloWorld;
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
LEA R0, HELLOWORLD
|
LEA R0, HELLOWORLD
|
||||||
PUTS
|
PUTS
|
||||||
|
|
||||||
HELLOWORLD .STRINGZ "Hello world!\n"
|
HELLOWORLD .STRINGZ "Hello World\n"
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ PutStr = -948
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
lib dc.b "dos.library", 0
|
lib dc.b "dos.library", 0
|
||||||
msg dc.b "Hello World!\n", 0
|
msg dc.b "Hello World\n", 0
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ LOOPBACK
|
|||||||
|
|
||||||
|
|
||||||
HELLOWORLD
|
HELLOWORLD
|
||||||
TEXT 'HELLO WORLD!' * string data
|
TEXT 'HELLO WORLD' * string data
|
||||||
BYTE 0
|
BYTE 0
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|||||||
Reference in New Issue
Block a user