Download Demo/Asm/DivByHand.txt from hschumann2/TempleOS-Source-Code: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/Asm/DivByHand.txt
- Command line
-
hf download hf://datasets/hschumann2/TempleOS-Source-Code/Demo/Asm/DivByHand.txt
-
curl -L -o DivByHand.txt https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/Asm/DivByHand.txt
481 Bytes
| asm { | |
| _DIV_U64_BY_U64:: | |
| PUSH RBP | |
| MOV RBP,RSP | |
| XOR RDX,RDX | |
| MOV RCX,64 | |
| MOV RAX,SF_ARG1[RBP] | |
| MOV RBX,SF_ARG2[RBP] | |
| @@1: SHL1 RAX | |
| RCL1 RDX | |
| CMP RBX,RDX | |
| JA @@2 | |
| INC RAX | |
| SUB RDX,RBX | |
| @@2: LOOP @@1 | |
| POP RBP | |
| RET1 16 | |
| } | |
| _extern _DIV_U64_BY_U64 I64 DivU64ByU64(I64 dividend,I64 divisor); | |
| "123456/10=%d\n",DivU64ByU64(123456,10); | |