Here is a link to the relevant legislation
Commonwealth Electoral Act 1918
The relevant part of the Act is quoted below (section 239):
"Voting above the line
(2) A vote may be marked on a ballot paper by:
(a) writing at least the numbers 1 to 6 in the squares (if any) printed on the ballot paper above the line (with the number 1 being given to the party or group for whom the person votes as his or her first preference, and the numbers 2, 3, 4, 5 and 6 being given to other parties or groups so as to indicate the order of the person’s preference for them); or
(b) if there are 6 or fewer squares printed on the ballot paper above the line—numbering the squares consecutively from the number 1 (in order of preference as described in paragraph (a))."
Here is further information regarding the amendments made
http://www.aph.gov.au/Parliamentary_Business/Bills_Legislation/Bills_Search_Results/Result?bId=r5626
See in particular the "Bills Digest" found towards the bottom of the page.