14? You need to add 1 or subtract one from the current number and state a "reason" to do so.According to me Good is those who is not killing anyone evil is kiling
13 so... we should program like we are still using assembly?12 "Don't program based on what the language provides" - My Prof.
13 For reference, this is a program that should print hello world.12. Yes... whatever that means...
;Copyright (c) 1999 Konstantin Boldyshev <[email protected]>
;
;"hello, world" in assembly language for Linux
;
;to compile:
;
;nasm -f elf hello.asm
;ld -s -o hello hello.o
section .text
global _start ;must be declared for linker (ld)
_start: ;tell linker entry point
mov edx,len ;message length
mov ecx,msg ;message to write
mov ebx,1 ;file descriptor (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel
section .data
msg db 'Hello, world!',0xa ;our dear string
len equ $ - msg ;length of our dear string
print "Hello, world!"
10 my teachers also shove recursion into everything right now, but considering we are going to learn functional programming (I think) and we where learning about functions, that makes sense.11 This class is going to be great. The study group for the class has had people post already that we should "[not] listen to $prof about not using for loops. At all. He's been doing it for years, and he's been wrong for years." Given the "don't program based on what the language provides" was in the part where he was having us implement an iterative algorithm recursively, I think it ties into this hatred of for loops.