A86: ld HL call


[Prev][Next][Index][Thread]

A86: ld HL call




ok,

I saw in an example prog the folowing code:


	call _clrLCD	; clear the screen
	ld hl, $0000	; stores $00 in h, $00 in l
	ld (_curRow),hl	; stores 0 in _curRow, 0 in _curCol
	ld hl, Hello	; hl points to string Hello
	call _puts		; print the string
	ld a, '!'		; load ! character in A
	call _putc		; print '!'
	call _newline	; go to next line
	ret				; return from program


The seconline of that reads:
	ld hl, $0000
is that making sure that 'hl' has nothing in it so that the next command:
	ld hl, Hello
can make hl be whatever 'hello' is?

also,  what does this mean:?
	call _putc
is that putCHARACTER?
and putS is putSTRING?

but how does 'putc' know to read the character in 'A'?

just a few questions,
BlAsTo1414


Follow-Ups: