#OIL, 134 106 103 102 bytes
OIL, 134 106 103 102 bytes
Takes the input from stdin, the two numbers seperated by a newline. Outputs the result of the integer division, then a newline, and then the remainder.
This is one of the most complicated OIL programs I've ever written, as OIL lacks builtins for division, remainder, addition, substraction, and so on. It works with the primitive way of doing division: repeated nested decrementation.
I present the code in an annotated format, with comments in the style of scripting languages. Before executing, the comments have to be removed.
5 # read input into lines 0 and 2
5
2
0 # the zero to compare to (nops)
1 # make a backup of the second input at line 3
2
3
10 # check if the second input is 0. %
4
2
24 # if so, jump to 24 (marked with §)
13 # else, go on
10 # check if the first input is zero &
4
31 # if so, jump to 31 (marked with $)
18 # else, go on
9 # decrement both numbers
9
2
6 # jump to line 8 (marked with %)
8
8 # increment the value in line 1 (initially a zero) §
1
1 # "restore the backup"
3
2
6 # jump to line 13 (marked with &)
13
10 # is the second number zero? $
4
2
42 # if so, jump to 42 (marked with +)
36 # else go on
9 # decrement both the second number and the backup
2
9
3
6 # jump to 31 (marked with $)
31
4 # print the division +
1
11 # a newline
4
3 # and the remainder (from the backup)
edit: Shaved off 3 more bytes by moving a "constant" to a one-digit location (less bytes to reference), and then implicit-ing 2 zero-locations (By using an empty line instead. One of them I could have done before).
edit: And another byte by making the initial zero implicit. We really only need a single literal zero.