1; 2; 3; $Id: time.asm,v 1.1 2016-05-12 21:47:13 dom Exp $ 4; 5 6 SECTION code_clib 7 PUBLIC time 8 PUBLIC _time 9 10 INCLUDE "target/test/def/test_cmds.def" 11 12.time 13._time 14 pop bc 15 pop hl 16 push hl 17 push bc 18 push hl ;save store 19 ld a,CMD_GETTIME 20 call SYSCALL 21 pop bc 22 ld a,b 23 or c 24 ret z 25 ld a,l ;swap bc + hl 26 ld l,c 27 ld c,a 28 ld a,h 29 ld h,b 30 ld b,a 31 ld (hl),c 32 inc hl 33 ld (hl),b 34 inc hl 35 ld (hl),e 36 inc hl 37 ld (hl),d 38 ld l,c 39 ld h,b 40 ret 41 42