Unit Instance
Units API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/units/92223/?format=api
https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_developers-handbook/en/?format=api", "source": [ "%include\t'system.inc'\n\n%define\tBUFSIZE\t2048\n\nsection\t.data\nfd.in\tdd\tstdin\nfd.out\tdd\tstdout\nhex\tdb\t'0123456789ABCDEF'\n\nsection .bss\nibuffer\tresb\tBUFSIZE\nobuffer\tresb\tBUFSIZE\n\nsection\t.text\nalign 4\nerr:\n\tpush\tdword 1\t\t; return failure\n\tsys.exit\n\nalign 4\nglobal\t_start\n_start:\n\tadd\tesp, byte 8\t; discard argc and argv[0]\n\n\tpop\tecx\n\tjecxz\t.init\t\t; no more arguments\n\n\t; ECX contains the path to input file\n\tpush\tdword 0\t\t; O_RDONLY\n\tpush\tecx\n\tsys.open\n\tjc\terr\t\t; open failed\n\n\tadd\tesp, byte 8\n\tmov\t[fd.in], eax\n\n\tpop\tecx\n\tjecxz\t.init\t\t; no more arguments\n\n\t; ECX contains the path to output file\n\tpush\tdword 420\t; file mode (644 octal)\n\tpush\tdword 0200h | 0400h | 01h\n\t; O_CREAT | O_TRUNC | O_WRONLY\n\tpush\tecx\n\tsys.open\n\tjc\terr\n\n\tadd\tesp, byte 12\n\tmov\t[fd.out], eax\n\n.init:\n\tsub\teax, eax\n\tsub\tebx, ebx\n\tsub\tecx, ecx\n\tmov\tedi, obuffer\n\n.loop:\n\t; read a byte from input file or stdin\n\tcall\tgetchar\n\n\t; convert it to hex\n\tmov\tdl, al\n\tshr\tal, 4\n\tmov\tal, [hex+eax]\n\tcall\tputchar\n\n\tmov\tal, dl\n\tand\tal, 0Fh\n\tmov\tal, [hex+eax]\n\tcall\tputchar\n\n\tmov\tal, ' '\n\tcmp\tdl, 0Ah\n\tjne\t.put\n\tmov\tal, dl\n\n.put:\n\tcall\tputchar\n\tcmp\tal, dl\n\tjne\t.loop\n\tcall\twrite\n\tjmp\tshort .loop\n\nalign 4\ngetchar:\n\tor\tebx, ebx\n\tjne\t.fetch\n\n\tcall\tread\n\n.fetch:\n\tlodsb\n\tdec\tebx\n\tret\n\nread:\n\tpush\tdword BUFSIZE\n\tmov\tesi, ibuffer\n\tpush\tesi\n\tpush\tdword [fd.in]\n\tsys.read\n\tadd\tesp, byte 12\n\tmov\tebx, eax\n\tor\teax, eax\n\tje\t.done\n\tsub\teax, eax\n\tret\n\nalign 4\n.done:\n\tcall\twrite\t\t; flush output buffer\n\n\t; close files\n\tpush\tdword [fd.in]\n\tsys.close\n\n\tpush\tdword [fd.out]\n\tsys.close\n\n\t; return success\n\tpush\tdword 0\n\tsys.exit\n\nalign 4\nputchar:\n\tstosb\n\tinc\tecx\n\tcmp\tecx, BUFSIZE\n\tje\twrite\n\tret\n\nalign 4\nwrite:\n\tsub\tedi, ecx\t; start of buffer\n\tpush\tecx\n\tpush\tedi\n\tpush\tdword [fd.out]\n\tsys.write\n\tadd\tesp, byte 12\n\tsub\teax, eax\n\tsub\tecx, ecx\t; buffer is empty now\n\tret" ], "previous_source": "", "target": [ "%include\t'system.inc'\n\n%define\tBUFSIZE\t2048\n\nsection\t.data\nfd.in\tdd\tstdin\nfd.out\tdd\tstdout\nhex\tdb\t'0123456789ABCDEF'\n\nsection .bss\nibuffer\tresb\tBUFSIZE\nobuffer\tresb\tBUFSIZE\n\nsection\t.text\nalign 4\nerr:\n\tpush\tdword 1\t\t; return failure\n\tsys.exit\n\nalign 4\nglobal\t_start\n_start:\n\tadd\tesp, byte 8\t; discard argc and argv[0]\n\n\tpop\tecx\n\tjecxz\t.init\t\t; no more arguments\n\n\t; ECX contains the path to input file\n\tpush\tdword 0\t\t; O_RDONLY\n\tpush\tecx\n\tsys.open\n\tjc\terr\t\t; open failed\n\n\tadd\tesp, byte 8\n\tmov\t[fd.in], eax\n\n\tpop\tecx\n\tjecxz\t.init\t\t; no more arguments\n\n\t; ECX contains the path to output file\n\tpush\tdword 420\t; file mode (644 octal)\n\tpush\tdword 0200h | 0400h | 01h\n\t; O_CREAT | O_TRUNC | O_WRONLY\n\tpush\tecx\n\tsys.open\n\tjc\terr\n\n\tadd\tesp, byte 12\n\tmov\t[fd.out], eax\n\n.init:\n\tsub\teax, eax\n\tsub\tebx, ebx\n\tsub\tecx, ecx\n\tmov\tedi, obuffer\n\n.loop:\n\t; read a byte from input file or stdin\n\tcall\tgetchar\n\n\t; convert it to hex\n\tmov\tdl, al\n\tshr\tal, 4\n\tmov\tal, [hex+eax]\n\tcall\tputchar\n\n\tmov\tal, dl\n\tand\tal, 0Fh\n\tmov\tal, [hex+eax]\n\tcall\tputchar\n\n\tmov\tal, ' '\n\tcmp\tdl, 0Ah\n\tjne\t.put\n\tmov\tal, dl\n\n.put:\n\tcall\tputchar\n\tcmp\tal, dl\n\tjne\t.loop\n\tcall\twrite\n\tjmp\tshort .loop\n\nalign 4\ngetchar:\n\tor\tebx, ebx\n\tjne\t.fetch\n\n\tcall\tread\n\n.fetch:\n\tlodsb\n\tdec\tebx\n\tret\n\nread:\n\tpush\tdword BUFSIZE\n\tmov\tesi, ibuffer\n\tpush\tesi\n\tpush\tdword [fd.in]\n\tsys.read\n\tadd\tesp, byte 12\n\tmov\tebx, eax\n\tor\teax, eax\n\tje\t.done\n\tsub\teax, eax\n\tret\n\nalign 4\n.done:\n\tcall\twrite\t\t; flush output buffer\n\n\t; close files\n\tpush\tdword [fd.in]\n\tsys.close\n\n\tpush\tdword [fd.out]\n\tsys.close\n\n\t; return success\n\tpush\tdword 0\n\tsys.exit\n\nalign 4\nputchar:\n\tstosb\n\tinc\tecx\n\tcmp\tecx, BUFSIZE\n\tje\twrite\n\tret\n\nalign 4\nwrite:\n\tsub\tedi, ecx\t; start of buffer\n\tpush\tecx\n\tpush\tedi\n\tpush\tdword [fd.out]\n\tsys.write\n\tadd\tesp, byte 12\n\tsub\teax, eax\n\tsub\tecx, ecx\t; buffer is empty now\n\tret" ], "id_hash": -6472611567857624774, "content_hash": -6472611567857624774, "location": "book.translate.xml:10815", "context": "", "note": "(itstool) path: sect1/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 1773, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 329, "source_unit": "https://translate-dev.freebsd.org/api/units/92223/?format=api", "priority": 100, "id": 92223, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_developers-handbook/en/?checksum=262caa1288c3193a", "url": "https://translate-dev.freebsd.org/api/units/92223/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-11-02T20:37:24.084567Z" }{ "translation": "